You are not logged in.

1

Sunday, April 25th 2010, 9:03pm

QGraphicsScene and GlWidget

Hello ,
I want to draw an opengl scene on the background of a QGraphicsScene, I download from http://doc.trolltech.com/qq/qq26-openglcanvas.html a sample code.
I compiled this application with QT 4.6.2 on two different system (one Windows XP with Geforce 8600M and the other was a Linux Centos ATI Radeon 3400) obtaining the same results:
The programs start but no OpenGl visible (see attachment #1) then I added as the first line of main

QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);

now the opengl is correctly rendered but the other widgets are drawn as white rectagles (see attachment #2)

Any idea how to get opengl together with the widgets in this application?


ag1234 has attached the following files: