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

showMinimized() prevents Qt Quick Window from being re-maximized via the taskbar

    XMLWordPrintable

Details

    • Linux/X11, Windows

    Description

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls 2.15
      
      Window {
          id: wnd
          width: 640
          height: 480
          visible: true
          visibility: Window.Maximized
          
          Button
          {
              anchors.centerIn: parent
              text: "Minimize Me"
              onClicked: wnd.showMinimized()
          }
      }
      

       

      Steps to reproduce

      1. Build and run the code above
      2. Use a native OS method to minimize the window (press [Win]+D, or click the Minimize button at the top-right corner of the window frame, or click the window's taskbar icon)
      3. Click the taskbar icon to restore the window
      4. Click the Qt Quick Button ("Minimize Me") to minimize the window via showMinimized()
      5. Click the taskbar icon to restore the window

       

      Outcomes

      • After Step #3, the window returns to its maximized state (expected)
      • After Step #5, the window appears as if showNormal() was called (unexpected)

       

      Notes

      When a QWidget is minimized using QWidget::showMinimized(), clicking its taskbar icon returns it to its maximized state (as expected). This issue only affects Qt Quick windows.

      Attachments

        1. qtbug107733.qml
          0.3 kB
          Friedemann Kleint

        Issue Links

          For Gerrit Dashboard: QTBUG-107733
          # Subject Branch Project Status CR V

          Activity

            People

              wladimir.leuschner Wladimir Leuschner
              skoh-qt Sze Howe Koh
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change