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

Closed state of QDockWidget not restored by QMainWindow::restoreDockWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.1
    • Widgets: Main Window
    • None
    • Arch Linux
    • d04107dd30c4af09eb879113f2a48839f8938bcf

    Description

      The following piece of code results in all dock widgets being visible after the call to restoreDockWidget, even though they were hidden when QMainApplication::saveState was called:

      restoreState(state.toByteArray());
      // Dock widget gets created
      ...
      restoreDockWidget(dockWidget);

      Unknown macro: {/quote}

      On the other hand, the following works as expected, with dock widgets remaining invisible if they were hidden when the state was saved:

      // Dock widget gets created
      ...
      restoreState(state.toByteArray());

      {/quote}

      I see no reason why restoreDockWidget would have a different behavior, forcing users to manage the visible state of dock widgets themselves, hence this bug report.

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            gnurou Alexandre Courbot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes