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

sizeHint() of QDialogButtonBox changes with first button added but not of enclosing layout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • None
    • 5.4.0
    • Widgets: Layout
    • None
    • OS X, Qt 5.4.0, 64 Bit, clang compiled.
      Windows 8, Qt 5.4.0

      If a QDialogButtonBox with no buttons is added to a layout, the sizeHint() of the layout containing the button box doesn't change after adding a button to the button box.

      After show() is called, the size (height) of the layout is corrected.

      I assume the problem is related to the dirty flag in QLayoutPrivate. This prevents a recalculation in QBoxLayout::sizeHint().

      Probably adding the first button to a QDialogButtonBox should set the dirty flag of the layout that contains the button box.

        1. ButtonBoxLayoutBug.zip
          3 kB
          Andreas Pehnack
        For Gerrit Dashboard: QTBUG-43617
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes