[Kde-games-devel] Extra resize events from KXmlGuiWindow

David Faure faure at kde.org
Fri Mar 27 18:52:13 GMT 2009


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). But first, a testcase, before we talk about solutions :)

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list