I am writing Qt (4.8.1 on Ubuntu 12.04) application that stores it's main window geometry between sessions. I noticed that if widget is maximized, qt is not storing it's non-maximized geometry. Obviously I would like my application to return to it's non-maximized size just the same if it was closed/started since last maximization. In
- Main window is not maximized and has geometry X;
- maximize main window;
- save window geometry (using QWidget::saveGeometry) to config file;
- close my application;
- start it again;
- load geometry from config file
- Restore (un-maximize? ;)
After step 6 window gets maximized (as expected), but after step 7 it returns to some internal default size (i. e. one set while designing form in QtCreator), not to last non-maximized geometry X.
Is this desired behavior? Or is it impossible/difficult to implement inside qt?
Is it because when maximized, the non maximized size is remembered by window manager and not qt (at least on linux)?