PDA

View Full Version : QAxBindable, opengl and powerpoint mayem



Seac02Devel
19th April 2010, 17:38
hello, qt users,
i have came across a small problem when using qt with opengl and activex support.
Basically I am writing an application featuring openGL graphics that has to be embedded inside a PowerPoint presentation using the ActiveX interface. To embed OpenGL i am using an extended QGLWidget and for the activeX interface i have one class featuring the QAxBindable.

My problem start when i add the activeX to the powerpoint slide. When the application is created, the activeX is active and so it is created a valid opengl context. However, as soon as the application is inited, the activeX becomes inactive and a second, passive opengl context is created.
Since I am not able to understand whitch Qt event triggers the change between the active and the passive contexts, all my display lists and other opengl data are created in the wrong environment and then when I start the presentation, I render just bogus geometries and materials.

Is there a qt event that may warn me when the openGL content is switched?

Thanks for any help,
Enrico