[Qt-interest] QGraphicsSvgItem scalling image question

franki franki at franki.eu.org
Mon Aug 22 14:56:06 CEST 2011


Hi,

I have some items on QGraphicsView that represents icons. Icons are clickable 
and can change look (e.g. switch on/off) I need these icons to come in different 
resolutions without lose of quality, so I tunerd to QGraphicsSvgItem, 
supposedly this is Scalable Vector Graphics. But I can find no way to change 
icon resolution. I've googled and all I've got is that I could change some 
parameters in svg file before loading, simply by parsing it. But with complex 
icon's that nearly impossible, or at least highly cumbersome.
	I do have however setScale() function that somes from QGraphicsItem, but 
this is just applying transormation matrix onto item, and the item does not 
have to be svg item,
	So my question is: Do I get this right? Only possible scalling is by 
setScale function or parsing svg text file? Because if so, what advantages 
gives me using svg format? Does this downscale better that png format giving 
better item quality?


best regards
Marek



More information about the Qt-interest-old mailing list