Qt QApplication frame rate drop while maximizing the window

We use Qt for the visualization viewer, and we are having problems with the QApplication::processEvents() method. Since we needed to control the frame rate (in the game loop mode), we redefined QApplication to define our own and our game loop, which looks like

 MainApplication app; // Some code here while (true) { app.processEvents(); app.doFrame(); // sync code, nothing for now } 

This works fine, the time is about 0.001s for calling processEvents() , whereas for an empty scene, doFrame() takes about 0.0001s. Now we have a problem when we double-click on the title bar (to enlarge the window). Indeed, after this, the call to processEvents() goes from approximately 0.001 to approximately 0.01 s (* 10). Most of the time, it seems, take in QPlatformBackingStore::composeAndFlush()

The view used is based on QOpenGLWidget, and all rendering is done outside of Qt (we write in Qt FBO).

Note that we do not override QApplication::processEvents() .

thanks

+2
c ++ qt opengl qtopengl qapplication
source share

No one has answered this question yet.

See similar questions:

7
How can I control the frame rate in Qt 3D?
2
Qt High Resolution Timer

or similar:

2299
When should static_cast, dynamic_cast, const_cast, and reinterpret_cast be used?
1699
What is a smart pointer, and when should I use it?
1305
When to use virtual destructors?
nine
Windows message window instead of QApplication :: exec () / QApplication :: processEvents ()
4
Simulated time in a game loop using C ++
3
QApplication without display
3
Is it possible to split the Qt GUI into several threads for graphical interface, modeling and OpenGL?
3
QOpenGLWidget with QApplication?
2
creating QApplication in another thread
one
QApplication :: processEvents does not work on Windows

All Articles