Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.3.0, 5.15
-
None
Description
Please have a look at the stack trace's picture.
I get a crash in my application because some code of mine, dependent on user input, is called at unexpected time.
The typical scenario is when a widget is shown. This causes the event queue, including user events, to be flushed. We certainly don't expect user events to be processed when "setVisible" is called on a widget.
I get this on Mac, but got it once on Windows too (in this case, a tip window move caused the flushing).
I see this as a design flaw (never had this in Qt 4.8): the user input events should not be flushed when showing a window, and actually in most contexts.
QWindowSystemInterface::flushWindowSystemEvents()
should have a QEventLoop::ProcessEventsFlag argument, just as sendWindowSystemEvents has.