[Kde-games-devel] Extra resize events from KXmlGuiWindow
mikelima at cirulla.net
Fri Mar 27 23:46:29 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
On venerdì 27 marzo 2009, David Faure wrote:
> On Friday 27 March 2009, Parker Coates wrote:
> > On Thu, Mar 26, 2009 at 3:17 PM, Albert Astals Cid wrote:
> > > A Dijous, 26 de març de 2009, Ian Wadham va escriure:
> > >> On Tue, 24 Mar 2009 1:30:41 pm Parker Coates wrote:
> > >> > In the KDEGames camp we've run into a small bit of trouble with
> > >> > KXmlGuiWindow generating an extra resize event on startup. An extra
> > >> > resize event may seem trivial enough, but because our games now all
> > >> > have resizable SVG based interfaces, a single extra resize event can
> > >> > mean extra SVG rendering, cache lookups, layout logic and a
> > >> > noticeable increase in start up time.
> > >> > <snip>
> >Next, the main widget is resized.
> >The size given seems to be that of the main window minus the height of
> >the tool bar and status bar. The main widget is then resized again to
> >be shorter by the height of the menu bar.
> Did you make a simple QMainWindow-based testcase?
> It seems to me that this behavior might come from Qt, which does layouting
> only upon showing and not before (unless you force it to, I have some
> workarounds in konq unittests for that).
Do you have a way to force Qt to do layout without showing a widget?
I think all of us have closed at least a context menu in kicker over the years
because it opens too low over the panel. If it were possible to force a
layout somehow, the geometry would be correct the first time the menu pops
Also, what you say seems to be part of the problem, but another seems to be
that the window is first opened with some "default" size, then it is restored
to the size it had when the application was last closed.
Or is this a different problem?
> But first, a testcase, before we
> talk about solutions :)
Uh, yes, a small test would help. ;)
Luciano Montanaro //
\X/ mikelima at cirulla.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the kde-core-devel