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

QML - FlexboxLayout doesn't account for gap when computing size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.10.0
    • Quick: Layouts
    • None
    • Linux/Wayland

      FlexboxLayout doesn't seem to account for the gap size when computing it's size based on it's children. Here an example snippet showcasing the issue:

      Window
      {
          visible: true
          
          color: "black"
          
          FlexboxLayout
          {
              id: flex
              
              direction: FlexboxLayout.Column
              
              gap: 30
              
              Box{}
              Box{}
              Box{}
          }
          
          Rectangle
          {
              anchors.fill: flex
              
              color: "#44ffff00"
          }
          
          component Box: Rectangle 
          {
              implicitWidth:  50
              implicitHeight: 50
          }
      }
      

      The resulting window:

        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:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes