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

Layouts do not expand/shrink items as expected

    XMLWordPrintable

Details

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

    Description

      When you set `Layout.fillWidth: true` (and possibly `Layout.fillHeight: true`) property on multiple items in the layout, they are expected to grow or shrink by the ratio established by their preferred sizes.

      According to the documentation:

      "If there are multiple items with fillWidth (or fillHeight) set to true, the layout will grow or shrink the items relative to the ratio of their preferred size"

       

      "If the layout is set to a specific size, it distributes additional space based on the ratio of preferred sizes of its items, while taking minimum and maximum sizes into account. The preferred and implicit sizes act as ratios and weights when all items set fillWidth and fillHeight"

      _-- https://doc.qt.io/qt-6/qtquicklayouts-overview.html#size-constraints_

       

      However when you set `Layout.minimumWidth` (or possibly `Layout.minimumHeight`) larger than preferred size, layout, probably due to some normalization, stops respecting preferred size, but uses the minimum size instead. Layout should respect minimum width constraint, but it should expand/shrink according to preferred width ratios.

      MRE in the attachments

       

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes