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

QWidget::restoreGeometry does not properly work for a central widget in QMainWindow if QDockWidget is present

    XMLWordPrintable

Details

    • UI Bug Fixing Q1/2021

    Description

      When having a dockwidget docked in a main window that has central widget present, saving and restoring geometry to the central widget does not properly work.

      Steps to reproduce:

      • Run attached sample
      • Resize the dock widget few pixels
      • Press "Hide" button that saves geometry of the central widget and hides it
      • Press "Show" button that shows the central widget and restores geometry to it
      • EXPECTED: central widget's geometry is identical to what it was before hiding it
      • ACTUAL: central widget's geometry is minimal, with dockwidget hogging up all available space

      The issue does not reproduce if the dockwidget is not resized. Also, calling save/restoreState works properly as a workaround.

      Attachments

        Issue Links

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

          Activity

            People

              smd Jan Arve
              jussi_witick Jussi Witick
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes