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

[Reg : 5.14 -> 5.15] Items are overlapped with Layout.fillWidth: true

XMLWordPrintable

    • macOS, Windows

      Behavior changed from 5.14.2 to 5.15.3.

      On 5.14.2 the text is evenly spaced in the container as expected.
      On 5.15.3 the text does not fill the container and instead overlaps one another.

      Screenshots

      Here's the sample code

      import QtQuick 2.14
      import QtQuick.Layouts 1.3
      import QtQuick.Window 2.14
      
      Window {
          width: 640
          height: 480
          visible: true
      
          RowLayout {
              anchors {
                  left: parent.left
                  right: parent.right
              }
      
              Repeater {
                  model: ["sometext", "andsomemoretext"]
                  delegate: Item {
                      Layout.fillWidth: true
                      // Next line commented out:
                      //      5.14.2 works
                      //      5.15.3 text overlaps, does not fill container
                      // Next line commented in:
                      //      5.14.2 works
                      //      5.15.3 works
                      //Layout.minimumHeight: 1
                      Text {
                          text: modelData
                      }
                  }
              }
          }
      }
      

      Setting "Layout.minimumHeight: 1" helps but it works fine without it in Qt5.14.

      How to reproduce :
      Please use qtbug93631.zip

        1. qtbug93631.zip
          2 kB
          Nahomi Gröhn
        2. qtbug93631-compare.png
          18 kB
          Nahomi Gröhn
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            smd Jan Arve
            nagrohn Nahomi Gröhn (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes