PDA

View Full Version : Help saving and restoring the states of the an Mdi Area and subwindows



aarelovich
7th July 2010, 15:54
Hi:

I have a QMainWindow with an Mdi Area with two subwindows I would like to save (using QSettings) the size and positions of the subwindows.

How can I do this? I have tried with the save and restore state fo the QMainWindow but it did not work.

Thank you for any help.

waynew
7th July 2010, 23:35
I have had no luck with QSettings. I save my main window and dialog window positions, sizes, and colors to a Sqlite database and restore as needed.
Works fine. Very simple code.

aarelovich
8th July 2010, 01:25
Yeah, I know.

But I do have some luck with it. I exchaned my two subwindows in an mdi area for two dockwidgets and the save\restore State\Geometry functions fo the QMainWindow work perfectly fine!

Thanks for the answer though!