problem description
how pyqt5+opengl draws functions other than paintGL
the environmental background of the problems and what methods you have tried
I used makecurrent () but still can"t draw
related codes
/ / Please paste the code text below (do not replace the code with pictures)
def mousePressEvent(self,r):
if self.paintFig == True:
self.defaultFramebufferObject()
self.makeCurrent()
glClear(GL_COLOR_BUFFER_BIT)
glPointSize(3.0) -sharp
glColor4f(0.0, 0.0, 0.0, 0.5)
glBegin(GL_POINTS)
glVertex2f(0,0)
glEnd()
glFlush()
print(r.button(),r.globalX(),r.x())
-sharp self.points.append((r.x(),r.y()))