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

[REG 5.3.X -5.4] Qt Designer: Setting centralWidget sizePolicy to fixed makes centralWidget unusable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.4.2
    • 5.4.0
    • Widgets: Layout
    • None
    • Windows, Linux
    • 6589fb7e0da291a3d93ff1803d66fb7942bf393e

      Steps to reproduce:

      • Start Designer, start new QMainWindow-based form
      • Drop some widget onto central widget
      • Set size policy of central widget to "Fixed"
      • Note: widget disappears
      • Note: The central widget gets a very small size in that dimension

      Similarly, loading qtbug43797.ui with Designer or the attached UI loader shows that the central widget becomes too small.

      When you use Qt Widget Designer to set centralWidget's sizePolicy to fixed all the existing widgets in centralWidget are hidden and you cannot add new ones.

      This is reproducible in any Form based UI e.g. with the default Qt Widgets application template. Just add random widgets to the main window and set centralWidget's horizontal or vertical sizePolicy to fixed.

      This is not reproducible in Qt Creator 3.2.2. And tested only on Windows.

        1. uiloader.zip
          2 kB
        2. Screenshot of unusable central widget.png
          Screenshot of unusable central widget.png
          10 kB
        3. qtbug43797.zip
          1 kB
        4. qtbug43797.ui
          1 kB
        5. qtbug43797_diag.diff
          0.7 kB
        For Gerrit Dashboard: QTBUG-43797
        # Subject Branch Project Status CR V

            tvete Paul Olav Tvete
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes