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

Layout.fillWidth/Height do nothing if the width/height are 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.1.0 Beta 1
    • Quick: Layouts
    • None
    • a6b01ff80139247ee2c4b41e9ebcf3694d83514b, graphicslayouts: cf366e8b862a616efd7c3d4683d59971f795d476

    Description

      In the code below I would expect the rectangle to stretch to fill the width of the RowLayout. Without explicitly setting the width to a value > 0, that doesn't happen. This is also true with Layout.fillHeight.

      import QtQuick 2.1
      import QtQuick.Layouts 1.0
      
      RowLayout {
        width: 100
        height: 100
        
        Rectangle {
          Layout.fillWidth: true
          color: 'red'
          //width: 1  // uncomment to make the red rectangle show up
          height: 10
        }
      }
      

      Attachments

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

        Activity

          People

            smd Jan Arve
            jfaust Josh Faust
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes