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

7th July 2010, 16:54

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.

8th July 2010, 00: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.

8th July 2010, 02: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!