save and restore the geometry of KMainWindow
Alexander Semke
alexander.semke at web.de
Mon Jan 29 08:17:54 UTC 2018
resending this to kde-devel...
On 28.01.2018 18:45, Alexander Semke wrote:
> 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
More information about the Kde-frameworks-devel
mailing list