Qt Stylesheet image: Can i add SVG code in "image:" instead of specifying url?
Solved
Mobile and Embedded
-
@vdevadass
IIRC this should work via Qt stylesheets. At least the Qt filesystem is capable of loading such urls, so my guess it also should work within QSS.image: url("data:image/png;base64,<base64ImageData>") // replace '<base64ImageData>'
-
Hi
Why cant you just use SVG images ?
Like ":/somefile.svg"
(it located in qresource) -
@vdevadass
Ok but it wont be external if you use resource as its compiled into the .exe (app)
Anyway, i doubt it will allow the actual SVG code directly. Did not tried it base64 encoded though :) -
@vdevadass
Note on SVG.
Im using SVG for all icons. I discovered that the page "box" ( at least if editing with InkScape)
would define the maximum size the icon would become. ( when used with QIcon)
So if some of the icons looks fussy, it might be the reason. Simply scale SVG up and resave.