Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. (Re-)store MainWindow - separatly QToolBar and QDockWidget
Forum Updated to NodeBB v4.3 + New Features

(Re-)store MainWindow - separatly QToolBar and QDockWidget

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suwide
    wrote on last edited by
    #1

    Hi Qt-DevNet,

    i have a problem with (re-)storing certain view-sets in my application. We have different view-sets and a certain view-set has itself "sub-view-sets" again.

    The sub-view-sets itself contains certain QDockWidgets which are depended on the sub-view-set and the user can toggle the visibility and change the position, which needs to be restored whenever the user switches back to this sub-view-set. The problem lies in the ToolBarArea which should not be sub-view-set depended which means i can't really (re-)store sub-view-set depended using the QMainWindow::restoreStates/saveStates functionallity.

    I am wondering if there is any possibility to separatly re-/store Toolbars or Dockwidgets for that matter since i want to use the saveState()/restoreState() function from the MainWindow. Or is there a intelligent workaround ? I know sub-view-sets may not be the state of the "GUI-art" but we need the Dock feature within the sub-view-sets.

    Also thought about using a separate MainWindow within the MainWindow for the view-set with sub-view-set but want to avoid this, since it has a "hacky" feel and since some DockWidgets are used view-set wide this may require some sort of management setting the correct parent and placing them into the respective MainWindow.

    Further the approach to manually restore the positions and visibility had some weird side effects where its not always restored as expected, e.g. stacked dock widgets would toggle or splitters weren't 100% there where they were before.

    Thanks in advance for any advice, ideas or even solutions,
    Peter Kluger

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved