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

Layout.verticalStretchFactor does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.6
    • Quick: Layouts
    • None

    Description

      I expect the two rectangles to have different heights, but why is it the same?
      btw cannot find any unit test for this API

      import QtQuick
      import QtQuick.Layouts
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          ColumnLayout {
              anchors.fill: parent
      
              Rectangle {
                  Layout.fillWidth: true
                  Layout.fillHeight: true
                  Layout.verticalStretchFactor: 3
                  color: "green"
              }
      
              Rectangle {
                  Layout.fillWidth: true
                  Layout.fillHeight: true
                  Layout.verticalStretchFactor: 1
                  color: "blue"
              }
          }
      }
      
      

       

       

      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
            jiu shanheng jiu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes