[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    save and restore the geometry of KMainWindow
From:       Alexander Semke <alexander.semke () web ! de>
Date:       2018-01-28 17:45:18
Message-ID: 82c3746d-72eb-cc6a-c5ee-f0177884743b () web ! de
[Download RAW message or body]

Hi,

KMainWindow takes care of saving/restoring the state of the main window, 
menus and toolbars.
Also, the size of the main window is correctly stored and restored. 
However, I don't see how
to save and restore the position of the main window. I checked couple of 
KDE programs
like dolphin, konsole, etc. - nothing restores the last window position 
correctly. I also tried to
to do saveGeometry() to KConfigGroup in the destructor and to 
restoreGeometry() in
the constructor but this doesn't seem to work. Is this because of the 
window manager ignoring
the geometry hints as mentioned in 
http://doc.qt.io/qt-5/application-windows.html#window-geometry ?

Can somebody point to an application doing this correctly?

Thanks and Regards,
Alexander
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic