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

QRadioButton/QCheckBox vs. QSizePolicy::Maximum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.8.0
    • 4.7.1
    • Widgets: Layout
    • None
    • 8daa3ee6591f0ec5f65552a8a9290228d6e9f0ab, 3dd2b86db2b10998dc0a49e2310dd2e8699159cf

      I understand QSizePolicy::Maximum as: "It can be shrunk until minimum size is reached, not beyound. Doesn't grow". And apparently all widgets in QLayouts behave accordingly.
      Not so QRadioButton/QCheckBox: They can be shrunk until they disappear.

      See attached screenshot and .ui file

      This bug seems to cause very interesting effects in real life applications. But that's too hard to demontrate.
      Also, I believe that this bug is resposible for Task 201962 (and maybe 217539 ?)

      Rejected:
      Reject:
      Your understanding of Maximum is wrong, QSizePolicy::Maximum means (as documented):

      "The sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g. a separator line). It cannot be larger than the size provided by sizeHint()."

      Therefore, setting QSizePolicy::Maximum will cause the widget to possibly shrink to a size less than sizeHint().
      Maybe you wanted to use Fixed?

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

            smd Jan Arve
            portale Alessandro Portale
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes