[Qt-interest] QtSvg rendering icon problem

franki franki at franki.eu.org
Tue Aug 23 16:03:58 CEST 2011


Hi all,

I have 200x200 pixel item which is picture in svg. Most of this picture is 
transparent alpha channel, only in the center of the picture there is circle 
with radius 50px, filled with color.  When I create QGraphicsSvgItem from that 
file, centered circle (with radius 50) is drawn in top left corner instead of 
the center, as if some kind of alignment were applied inside this 200x200 
square. 
If I convert this svg into png file, and then I create QGraphicsPixmapItem, 
everything is OK, I get 200x200 square with circle drawn in center of the 
pixmap.

So It looks to me as if it was problem with rendering picture from svg file 
format. Does anybody had a similar problem? Same picture rendered in any 
graphic viewer is displayed properly. Some bug maybe? I'm using Qt 4.7.3 on 
Linux platform.

best regards
Marek



More information about the Qt-interest-old mailing list