On Wed, 20 Jul 2016 10:44:16 -0700, Thiago Macieira wrote: >> Why SVG support of QIcon can not cache rendered result? So re-rendering >> will be as fast as for PNGs. Or you are saying about app startup time? > > Startup.
When using SVGs you have to load/parse it into QSvgRenderer and later it needs to be replayed via QPainter in the size you need. While the second step can't be avoided at runtime, it is possible to convert SVGs into something, that can be loaded significantly faster, at compile time. I'm using an implementation based on this class: http:// qwt.sourceforge.net/class_qwt_graphic.html. This is a record/replay device for QPainter commands - like QPicture, but suitable for vector graphics. I added load/save methods ( not yet in SVN ) and then the compiler itself is 20 lines of code only. When using such a concept with Qt Quick, better don't use standard Image classes as they are designed for raster graphics. Better write your own type of control for it - at least this is what I did. Uwe _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
