PDA

View Full Version : QGLWidget flickering on geometry transitions



danipellex
13th March 2014, 09:18
Hello,

I have a custom QGLWidget, as child of a QWidget, and I locate it manually, not assisted by a layout.
When doing a geometry transition, I mean, change geometry (or resize + move) from rectangle1 to rectangle2, inside parent area, I have a flicker effect.
If I trace at resizeGL and paintGL, it happens only what it should, no bad sizes or bad positions, but the bad visual effect is still there.
If I change my QGLWidget by a QWidget to draw the same (losing performance, but it is other story), i works perfect on geometry transitions.
Transitions are: change geometry (size + position), 15 times every 500 milliseconds, enough for eye to see continuous and not saturating CPU.

Qt 4.8.
Platform: It happens exactly the same on WinXP, Win7 and MacOSX 10.6, what makes me think it is something i am doing bad

I searched into the manuals, of course, and I think is is related to the attribute Qt::WA_PaintOnScreen, set by default for QGLWidget.
I searched into the forums, but no luck.

thank you,
pellex

wysota
20th March 2014, 17:32
Please provide an example code demonstrating the problem.