Re: PyQt4 - remember widget positions

2009-10-22 Thread nusch
On Oct 22, 4:05 am, TerryP bigboss1...@gmail.com wrote:
 On Oct 21, 9:04 pm, nusch nusc...@gmail.com 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?

 Both fast and simple have relative meanings, there may be some common
 persistence mumbo jumbo added to Qt since I last looked but, in
 generally read this:

    http://doc.trolltech.com/4.5/geometry.html

 I don't know off the top of my head if PyQt's documentation has code
 examples on it, but it should be fairly easy for you to comprehend how
 to do it in Python.
 .
 --
 TerryP

Yes, but I meant how to store all QApplication windows size and pos at
once, I don't want to introduce lot of additional strings describing
keys in QSettings. I migrated my app from PyKDE to pure PyQt4 and
there was 1 command for whole app to remember those settings.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyQt4 - remember widget positions

2009-10-22 Thread Jeremy Sanders
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/
-- 
http://mail.python.org/mailman/listinfo/python-list


PyQt4 - remember widget positions

2009-10-21 Thread nusch
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?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyQt4 - remember widget positions

2009-10-21 Thread TerryP
On Oct 21, 9:04 pm, nusch nusc...@gmail.com 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?


Both fast and simple have relative meanings, there may be some common
persistence mumbo jumbo added to Qt since I last looked but, in
generally read this:

http://doc.trolltech.com/4.5/geometry.html

I don't know off the top of my head if PyQt's documentation has code
examples on it, but it should be fairly easy for you to comprehend how
to do it in Python.

--
TerryP
-- 
http://mail.python.org/mailman/listinfo/python-list