Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.6
-
None
Description
The expectation is that QPrintDialog::exec() is a blocking operation. It seems however if an event from the eventloop triggers the print action AND there is an expensive calculation between the event trigger and the QPrintDialog::exec call, extra events can get processed while in the QPrintDialog::exec call.
A simple example of this would be a "Print" button that someone double clicks instead of single clicks (as users are known to do). The first click event goes into the print code and executes QPrintDialog::exec. Within exec, it seems like more events are allowed to process, at which time the second click event calls QPrintDialog::exec a second time. The end result is two print dialog open at the same time. Additionally, depending on implementation, errors or crashes can easily occur.
Please see the attached minimal example.