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

Windows: QApplication doesn't catch WM_CLOSE if all windows are closed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.8.6, 5.3.0
    • QPA: Windows
    • None
    • Windows 7 - 64bits
      Qt 5.3

    Description

      Under windws, if a QApplication have set setQuitOnLastWindowClosed to false,
      and there is no window left (a tray app for exemple):

      Qapplication doesn't catch the WM_CLOSE event sent when:

      • taskkill command
      • QtCreator "stop" button
      • Windows end session (logout, shutdown, etc...)

      It's may be caused by hwnd == 0 not managed in Qt

      You can see the bug and a work-around in attached file

      Attachments

        1. main.cpp
          1 kB
        2. qtbug40107.zip
          2 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              samysam Samuel Déal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes