Re: save and restore the geometry of KMainWindow
- Date: Tue, 30 Jan 2018 16:38:52 +0100
- From: Milian Wolff <mail@xxxxxxxxxx>
- Subject: Re: save and restore the geometry of KMainWindow
On Monday, January 29, 2018 9:17:54 AM CET Alexander Semke wrote:
> 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?
This works for me:
What window manager are you using?