[Qt-interest] restoreGeometry of QMdiSubWindow
Malyushytsky, Alex
alex at wai.com
Tue Aug 11 01:51:42 CEST 2009
K'p in mind that as non c'tor of QT I might miss s'ng?!?
But especially if your application supposed to run under X11,
you might find h'ful:
http://doc.trolltech.com/4.3/geometry.html
Search for "Restoring a Window's Geometry".
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of RZ
Sent: Monday, August 10, 2009 3:41 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] restoreGeometry of QMdiSubWindow
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list