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

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

XMLWordPrintable

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

      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

        1. main.cpp
          1 kB
          Samuel Déal
        2. qtbug40107.zip
          2 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes