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

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

    XMLWordPrintable

Details

    • macOS, Windows

    Description

      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

      Attachments

        1. qtbug93631.zip
          2 kB
          Nahomi Gröhn
        2. qtbug93631-compare.png
          18 kB
          Nahomi Gröhn

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: