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

Incorrect height of pane with dynamic content

    XMLWordPrintable

Details

    • Windows

    Description

      In the following example there is a button which toggles the visibility of a label. As a result the height of the pane expands although it should not. However, it works with Qt 5.15.0.

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts 1.15
      
      ApplicationWindow {
          id: root
      
          property bool triggerLayoutIssue: false
      
          visible: true
          width: 800
          height: 600
      
          Pane {
              contentItem: ColumnLayout {
                  RowLayout {
                      Button {
                          text: "Trigger Layout Issue"
                          onClicked: root.triggerLayoutIssue = true
                      }
                      Label {
                          text: "Label"
                          visible: root.triggerLayoutIssue
                      }
                  }
              }
              background: Rectangle {
                  color: "red"
              }
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dmartin Daniel Martin
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes