Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. I need help working with saveGeometry() and saveState() on Pyside
Qt 6.12 LTS is out! See what's new in the release blog

I need help working with saveGeometry() and saveState() on Pyside

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 2.0k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello, I'm writing an application with a main window composed by 4 QDockWidgets. I would like that the 4 QDockWidgets would be visible when the the program starts up, but what I'm getting is that the QDockWidgets start-up very close to the MainWindow edges and so most of its content isn't visible.
    I tried to solve this problem with the Resize() function, the setGeometry() function, but had no success, the QDockWidgets remained unchaged.
    Also tried a solution that I think is more interesting. I made a button that when pressed it makes a call to MainWindow_object.saveGeometry() and MainWindow_object.saveState(), that save the window state and configuration to a file on the Disk. And in the MainWindow is placed code that when the program starts the file with the window configuration is read, and loaded into the MainWindow through restoreGeometry() and restoreState().
    But when I run the program, the QDockWidgets always start on the same positions, and with most of the content cut.

    You can see and try the code here, it is in Python:
    http://dl.dropbox.com/u/4352530/test_excel_4.zip

    I really appreciate your help, because this is my current work and is important to me. Thanks for reading, Best Regards. DavidQ

    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
    • Unsolved