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

Window incorrectly resized while hidden (QML)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.14.2, 5.15.1
    • None
    • Windows 10 x64. MinGW x64 8.1.0, MSVC 2017 x64, MSVC 2019 x64
    • Windows

      Window's (and ApplicationWindow's) behavior is incorrect, when it is resized while hidden. Here is minimal reproducible example:

       

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Window {
              id: window
      
              Rectangle {
                  anchors.fill: parent
                  color: "red"
              }
          }
      
          Button {
              text: "Open"
              onClicked: {
                  window.width += 50;
                  window.height += 50;
                  window.show();
              }
          }
      }
      

       

      Steps:

      • Run
      • Press "Open"
      • Close window
      • Press "Open" - you will see that red Rectangle doesn't fill the window

       

      Screenshot

        1. Screenshot.png
          10 kB
          Ihor Drachuk
        2. untitled.zip
          2 kB
          Ihor Drachuk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            morteza.jamshidi Morteza Jamshidi
            ihor.drachuk Ihor Drachuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes