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

Layout with an expanding item that has a maximum size does not grow non-expanding items.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.8.6, 5.2.0
    • 5.1.0
    • Widgets: Layout
    • None
    • c3958b592a1d46eb1b536bd09cce1aa919d02635 b855e578044e49b588b32085968c63a910b9daae

      I have the following horizontal layout (size hints in curly braces, {min,pref,max})

      | - [A:{11,84,84}] - [B{75,75,16777215}] - |
      

      size policy of A: QSizePolicy::Expanding
      size policy of B: QSizePolicy::Preferred

      When the layout is made wider, only the Expanding item will grow. As soon as the Expanding item has reached its limit, it will distribute space between the items instead of growing item B.

      This causes things to break such as QTBUG-25801, because other code paths of the layouts system expects that all expanding or growing items will grow to their fullest.

        1. main.cpp
          0.6 kB
        2. narrow.png
          narrow.png
          7 kB
        3. QTBUG-25801-b.pro
          0.3 kB
        4. wide.png
          wide.png
          13 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            smd Jan Arve
            smd Jan Arve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes