Using QSettings to save window position/size

30 views
Skip to first unread message

Ville M. Vainio

unread,
Jul 17, 2009, 2:54:24 PM7/17/09
to leo-e...@googlegroups.com
One of my pet annoyances is the twitching of leo windows on startup
(and that I always need to resize/move them, especially if I didn't
save it).

This might be the solution:

http://stackoverflow.com/questions/866970/qt-how-to-set-main-windows-initial-position

This would be quite user-friendly, especially when compounded with an
option to disable reading/writing of the information to/from .leo
files. The key is to save the information when window is closed.

--
Ville M. Vainio
http://tinyurl.com/vainio

Edward K. Ream

unread,
Aug 4, 2009, 11:51:09 AM8/4/09
to leo-e...@googlegroups.com
On Fri, Jul 17, 2009 at 1:54 PM, Ville M. Vainio <viva...@gmail.com> wrote:

One of my pet annoyances is the twitching of leo windows on startup
(and that I always need to resize/move them, especially if I didn't
save it).

This might be the solution:

http://stackoverflow.com/questions/866970/qt-how-to-set-main-windows-initial-position

There are already several calls to setGeometry in the qt gui.

In particular, setTopGeometry calls setGeometry.

I suspect the "twitching" is due to too many calls to setGeometry, not too few.

Edward

Ville M. Vainio

unread,
Aug 4, 2009, 12:33:25 PM8/4/09
to leo-e...@googlegroups.com
On Tue, Aug 4, 2009 at 6:51 PM, Edward K. Ream<edre...@gmail.com> wrote:

> There are already several calls to setGeometry in the qt gui.

Yes, that's the problem ;-).

>
> In particular, setTopGeometry calls setGeometry.
>
> I suspect the "twitching" is due to too many calls to setGeometry, not too
> few.

Indeed. I thought this one call could be removed by one that restored
the previous geometry from QSettings.

However, this problem is not at all of interest anymore. I have pushed
mod_framesize.py that prevents programmatic geometry changes by
hardcoding the framesize (and hence eliminates twitching and weird
frame sizes when pulling from bzr). Also, the tabbed ui pretty much
makes this issue irrelevant.

Edward K. Ream

unread,
Aug 4, 2009, 12:52:13 PM8/4/09
to leo-e...@googlegroups.com

Ok then.  I won't worry about it :-)

Edward
Reply all
Reply to author
Forward
0 new messages