[Qt-interest] restoreGeometry of QMdiSubWindow

RZ rz at univie.ac.at
Tue Aug 11 00:40:36 CEST 2009


Hi all,

I want my mdi sub windows to appear at the same location and with the 
same size they were closed with. To achieve that I just copied code out 
of the Qt Assistant docs namely

QSettings settings("MyCompany", "MyApp");
settings.setValue("geometry", saveGeometry());

in the closeEvent and

QSettings settings("MyCompany", "MyApp");
restoreGeometry(settings.value("myWidget/geometry").toByteArray());

in the c'tor of the mdiChild. Although the settings get stored this does 
not work (can very easily be checked with the mainwindows/mdi example).

While this usualy works is this a bug? Or did I miss some special 
features of QMdi* ?!?

Regards,

RZ



More information about the Qt-interest-old mailing list