Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2, 4.6.3, 5.4.2, 5.11.1
-
Windows/Linux possibly other platforms as well.
-
dfd2dbcda509835014dd9091884bf6ae62cb83b3 (qt/tqtc-qtbase/tqtc/android_automotive-5.15)
Description
Currently the QProgressDialog::setValue(int) function can decide to call QApplication::processEvents() based on the results of QWidget::isModal(). However, this function returns true when a dialog anything but modeless. A progress dialog that is window modal does not need this processEvents() call to keep the application responsive. Calling processEvents() is only useful when the dialog is application modal.
In the case that a background thread is performing an action and the progress dialog is kept window modal, this may cause a large amount of setValue() calls to be queued which in turn may cause a stack overflow, more or less the very thing you put a warning for in the documentation. Using a window modal dialog should not cause these kinds of issues, as you can normally use the application's event loop.