PDA

View Full Version : Qt + SDL problem



aldofi
10th February 2006, 15:58
Hi,
I'm writting a 3d editor with real time animation capabilities. For programming the interface I decided to use Qt to make everithing as much portable as possible and for real time performance SDL is right because the control you have on timers/main loop.
The porblem I'm having is related to the event processing in Qt and SDL. I made a button toolbar in Qt which just initilizes SDL and enters in a loop painting in a window. The animation goes well but suddenly, SDL just stops processing events or painting the window. I think this is happening because of the event/main loop fight between SDL and Qt. Is t possible to stop the QApplication event processing for a while and "reconect" it later without exiting or quitting the whole thing?

thanks in advance

Aldo

wysota
10th February 2006, 17:07
QApplication only processes events, when the application is not doing anything else (meaning that the control returns to QApplication::exec() ), so if you want it to stop processing events while doing something else -- just do it, events won't be processed.

Did you think about using QGLWidget instead of SDL here? SDL uses OpenGL for 3D plotting anyway, so it may be faster and easier to use OpenGL directly through QGLWidget.