open non-theme svg file

Sebastian Kügler sebas at kde.org
Mon Dec 14 12:22:21 CET 2009


On Sunday 13 December 2009 22:38:39 Florian wrote:
> I'm trying to use Plasma::Svg to load an svg file from a plasma package. I
>  put  the svg file into the contents/images directory, as suggested in [1].
>  Then i tried to load them using Plasma::Svg::setImagePath(). Intuitively
>  I'd expect something like this to work:
> 
> Plasma::Svg svg;
> svg.setImagePath("images/filename.svg")

Not sure about the full path, but you should leave out the .svg (Plasma figures that 
out itself, also for .svgz).

> But if I understand this correctly, this is only used to load theme svg 
> images, not custom svg images. If I want to load my own images I'm supposed
>  to  load them using absolute paths. Is there a way to tell Plasma::Svg to
>  look for an svg file relative to the contents directory of a plasma
>  package?


-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list