QApplication::processEvents timing
Unsolved
General and Desktop
-
Hi guys,
We are using Qt for a visualization engine viewer, and we are having issues with theQApplication::processEvents()
method.
Since we needed to control the framerate (in a game loop fashion), we overrided theQApplication
to define our own and our game loop that looks likeMainApplication app; // Some code here while (true) { app.processEvents(); app.doFrame(); // sync code, nothing for now }
This works fine, timing are about 0.001s for the
processEvents()
call, while, for an empty scene, thedoFrame()
takes about 0.0001s.
Now, we have a problem when we double click on title bar (to maximize the window). Indeed, after doing that,processEvents()
call, goes from about 0.001s to about 0.01s (*10). Is this a known issue when usingQtOpenGLWidget
? (most of the time seems to be taken inQPlatformBackingStore::composeAndFlush()
)Thanks