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

QMainWindow/QDockWidget: Add flags to saveState() and saveGeometry to save the current layout.

XMLWordPrintable

      If the state/layout of a QMainWindow with a QDockWidget in it is loaded at the startup of an application has info on N dockWidgets, regardless of how many dockWidgets you have during the run, the same number of N dockWidgets states/layout will be saved as long as the number of dockWidgets during the run does not exceed N.

      If it does exceed N, the number of saved dockWidgets will be N + what number of dockWidgets above N. However if M dockWidgets where created during the run, where M <= N, then the saved state will have info on N dockWidgets where layout of the (N-M) dockWidgets will be reset to zero.

      There is not way to only save the state of M dockWidgets and leave out the state/layout of (N-M) that was not created during the time the application was running.

      The suggestion is to add a flag to saveState() and saveGeometry() to create a byte array with states/layouts containing only currently existing dockWidgets, or return a byte array with all states/layouts in the QMainWindow.

      Currently it will return a byte array with all states that are in the QMainWindow. Some states are loaded and some are from currently existing dockWidgets.

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

            Unassigned Unassigned
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes