Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.3, 6.4, 6.2
-
None
Description
There is a diffent behavior of Qt.quit() and onClosing between QApplication and QGuiApplication. QApplication doesn't go into onClosing() loop while QGuiApplication does. For this reason QQEM (QGuiApplication) was affected by this while e.g. examples/quickcontrols2/texteditor is only affected when QT_WIDGETS_LIB isn't defined.
Test1: Build examples/quickcontrols2/texteditor without Qt Widgets or add "#undef QT_WIDGETS_LIB" into beginning of texteditor.cpp. Run, modify text, try to close the window -> Application can not be closed.
Test2: Build attached simple app. Enabling QGuiApplication hangs the application when trying to quit it, enabling QApplication makes it work.
I think we should either 1) fix QGuiApplication to quit also when close.accepted = false. Or if this is a feature 2) Fix the examples/quickcontrols2/texteditor to not hang when it is built without widgets. For example set close.accepted only based on quitDialog output.