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

QtQuick: RowLayout in footer not resizing when window is maximized

    XMLWordPrintable

Details

    • Windows

    Description

      Use the following main.qml in a fresh project:

      import QtQuick 2.11
      import QtQuick.Controls 2.4
      import QtQuick.Layouts 1.3
      
      ApplicationWindow {
          visible: true
          width: 400
          height: 600
      
          footer: RowLayout {
              Button {
                  Layout.fillWidth: true
              }
      
              Button {
                  Layout.fillWidth: true
              }
      
              Button {
                  Layout.fillWidth: true
              }
          }
      }
      

      Now run and resize the window by dragging an edge or corner. You will see that the buttons nicely adjust to the size. However, if you simply maximize the window, the buttons fail to update and stay the same size as they where previously.

       

      P.S.: Afterwards, if you change the size again once, e.g. unmaximize the window, then the buttons are the size they probably should have been when the window was maximized. It seems like when the window is maximized, a size is computed but not applied to the buttons visually, and it kind of bugs around that way. I'll be using this instead for now, which works:

      RowLayout {
          width: parent.width
          anchors.bottom: parent.bottom
          Button { Layout.fillWidth: true }
          Button { Layout.fillWidth: true }
          Button { Layout.fillWidth: true }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            qtrockssmile Matthias S.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes