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

ApplicationWindow.onClosing can't know intent to quit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0
    • GUI: Other
    • None
    • macOS

    Description

      I have a QML app that handles ApplicationWindow.closing signal. I use an onClosing handler to avoid quitting and hide the app window instead. I also setup a MenuBar with a Quit action that actually quits.

      When I use the macOS dock menu to quit the application, it just calls ApplicationWindow.closing which hides the window and doesn't quit. There is no way to know the intent behind the closing of the window.

      Probably a way to know that the system wants to kill the app is needed. Or Qt should at least trigger the custom Quit action, if present. I feel this issue is caused by the fact that Qt mixes the concept of window closing with the concept of application quitting.

      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
            flaviotordini Flavio Tordini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes