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

Incorrect height of pane with dynamic content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      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

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes