PyQt4 - remember widget positions

nusch nusch88 at gmail.com
Thu Oct 22 04:48:02 EDT 2009


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



More information about the Python-list mailing list