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

QML - AlignItems property in FlexBoxLayout is ignored when child uses Layout.fillWidth/Height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.10.0
    • None
    • Linux/Wayland

      I noticed that when I have an Item that uses Layout.fillHeight: true inside an FlexboxLayout with direction: FlexboxLayout.Column the item does not align itself as set via alignItems/alignContent, instead always defaulting to Start.

      Below is a sample code and the resulting Image.

      FlexboxLayout
      {
          anchors.fill: parent
      
          direction: FlexboxLayout.Column
      
          alignItems: FlexboxLayout.AlignCenter
      
          alignContent: FlexboxLayout.AlignCenter
      
          Rectangle
          {
              Layout.preferredHeight: 100
              Layout.preferredWidth: 100
      
              color: "red"
          }
      
          Rectangle
          {
              Layout.fillHeight: true
              Layout.preferredWidth: 100
      
              color: "green"
      
              FlexboxLayout.alignSelf: FlexboxLayout.AlignEnd
          }
      }
      

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jsentity Timur Vaydogan
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes