|
Before, when I use QDockWidget, I can use restoreGeometry and restoreState to do reload layout of QMainWindow which saved by saveGeometry and saveState , but this way seem not worked with CDockWidget. I was wondering if I can find a way to restore the last time's layout of CDockWidget . The perspectives mechanism looks like a solution, so I tried it, but seemed not work as I expected. I found in the "AutoHide" example and "CentralWidget" example, if I created some perspectives, then I can switch layout by clicking perspective list, and if I exited software, when the next time I open the program, the perspectives list is empty. Thanks again ❤️ |
Answered by
yiman0919
Jan 17, 2025
Replies: 1 comment
|
I think I found the solution, in CDockManager, we have loadPerspectives() method to do this task |
0 replies
Answer selected by
yiman0919
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I found the solution, in CDockManager, we have loadPerspectives() method to do this task