Details
-
Suggestion
-
Resolution: Unresolved
-
P5: Not important
-
None
-
4.7.0
-
None
Description
There should be a capability of setting a stylesheet to the Qt Svg module. All Svg images loaded would by default inherit these styles. Svg already handles CSS, so why not provide an API to persist this?
Couple of scenarios where I needed this:
1. I'm writing a dialog to browse hundreds of SVG images and if they are using the same single external CSS (theme), the CSS gets parsed each time, when each SVG image is rendered. This is bringing the performance down drastically.
I did some hack in the qsvghandler_p.h to cache this CSS, and thus greatly improving performance for my needs.
But seriously a more elegant solution would be to set this at some root level. I feel this is a very common scenario.