PyQt4 - remember widget positions
Jeremy Sanders
jeremy+complangpython at jeremysanders.net
Thu Oct 22 05:22:45 EDT 2009
nusch wrote:
> Is there any simple command which allows me to save position of all
> windows: QMainWindow, QDialogs and qdockwidgets with their sizes,
> dock state and positions ? Or do I need to store those values
> manually, how can I do it fast?
You can use saveState() from QMainWindow to save the dockwidget geometries.
I save the size and position of the main window separately and restore it
with resize() and move().
You need to make sure all your toolbars and dockwidgets have unique object
names for saveState to work.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
More information about the Python-list
mailing list