[Kde-games-devel] Saving overheads when resizing SVG

Ian Wadham ianw2 at optusnet.com.au
Sat Jun 2 06:52:12 CEST 2007


In case you did not see Dmitry's recent commit (I only came across
it by chance), here is a way to avoid resizing and re-rendering your
SVG elements when another resize event is pending.  In your resixe
event code do something like:

    if (QWidget::testAttribute (Qt::WA_PendingResizeEvent) {
        return;
    }

In particular, when the main window starts up, it generates *two*
resize events, one of which is "pending", so your game could be
rendering its SVG twice at startup time.  The above will fix that.

Nice tip, Dmitry!  All the best, Ian W.


More information about the kde-games-devel mailing list