Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106946

QGuiApplication / texteditor example not quitting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.3, 6.4, 6.2
    • Quick: Other
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kagro Kaj Grönholm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes