View Full Version : Flickering when drawing Qt widgets over an OpenGL window

31st May 2010, 15:31
Our application creates a frame that is used for drawing OpenGL, but does not use the QGLWidget for this. We also create additional frames as children of this “graphics window” (GW) for “micro dialogs” (MD) that are used to user input typically for the selected object in the graphics area. In Qt 3 this all works fine, while in Qt 4, since the “updatesEnabled” for the GW is set to false, none of the children will have there updatesEnabled either. Our application also paints a variable gradient background painted across the entire application, and for the GW, we also paint the same gradient in OpenGL.
In Qt 4, if I set updatesEnabled for the GW, then I do see the MD’s, but, and I am assuming this here, because the backing store is used everywhere now, I also am seeing additional artifacts on the screen until the next time we redraw in OpenGL, and flickering when the MD is moved within the GW. I can also set the parent of the MD’s to the GW’s parentWidget, and they also display, but also with the flickering.

So my questions are, would switching to the QGLWidget alone solve these repainting problems, or would I have to update the backing store from the OpenGL frame buffer after it (OGL) repaints? I tried all the attributes that I could think of for both the GW and the MD to no avail.