Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
4.7.2
-
None
-
X11 with QEventDispatcherGlib
Description
The documentation for QApplication::processEvents() states that it processes events "... until there are no more events to process". However, with the glib-based event loop, this is not true. QEventDispatcherGlib::processEvents calls g_main_context_iteration only once and returns.
If this has been reported elsewhere, I was not able to find it. I really took some effort to dig up something, but these keywords appear in so many stack traces that it's impossible to google anything meaningful.
In a legacy app that I dare not touch any more than absolutely necessary I have something like this:
while (needsMoreWaiting()) {
QApplication::processEvents();
QThread::msleep(10);
}
This fails to keep up with handling mouse events, so moving the mouse excessively is a good way to send the application into blocked state for a few seconds. I need to use something like this now to get rid of this annyoing behavior:
while (needsMoreWaiting()) { #if defined(Q_WS_X11) do { QApplication::processEvents(); } while (QApplication::hasPendingEvents()); #else QApplication::processEvents(); #endif QThread::msleep(10); }
Attachments
Issue Links
- relates to
-
QTBUG-79020 QCoreApplication::processEvents() does not process queued events
- Open