Hi,
I have a QGLWidget
which draws both 3D and 2D graphics (just like in Qt's overpainting example).
The thing is after I added drawing 2D graphics (moved code from paintGL() to paintEvent(), etc.), the widget stopped redrawing most of the times. It didn't redraw after resiging, after loading, and so on. So I put repaint()
calls, it helped in some cases, but doesn't help in e.g. resizing.
So which function should I use to refresh the widget? Is it update()
or updateGL()
or repaint()
? Or maybe there is a way to set some mode to enable automatic redrawing after resizing/load/...?
Thanks.