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

    • UI Bug Fixing Q1/2021

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes