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

QApplication::aboutToQuit not emitted if the window is hidden

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.4.1
    • QPA: Windows
    • None
    • Windows 7

    Description

      Under windows (Windows 7 tested), the QApplication::aboutToQuit is not emitted if the application window is hidden and has a system tray icon.

      The provided example is an application with a system tray icon. The window is hidden when minimized so that it stays visible only in the tray. Upon startup, the application creates a file in the user home, and cleans it when quitting. The cleanup is also done when the user closes its desktop session, thanks to the aboutToQuit signal. But if the session is closed while the application is minimized to the tray, the signal is not emitted and the file is not deleted. Next time the application starts, it shows a warning as the file was not cleaned properly.

      Attachments

        1. QtBugAboutToQuit.zip
          2 kB
          Etienne Sandré-Chardonnal
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            galinette Etienne Sandré-Chardonnal
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes