Svg Rendering Perspective Transform on QGraphicsView Viewport
-
Hi. I'm using Qt5, and am loading an svg as a QGraphicsSvgItem to be displayed in a QGraphicsView widget. The svg loads fine. However, whenever I set a transform on my viewport with a change in the view perspective (i.e. through m13, m23 and m33), the svg does not render on my changed view (simple scaling factors and translations are work fine). Also, this is not an issue if I use a pixmap in place of an svg (however, I really want to use svgs since the pixmaps get blurry when zooming in loads, which I need for my use case). I'd appreciate any input. Thanks
-
@RobotMaker said in Svg Rendering Perspective Transform on QGraphicsView Viewport:
Some code will be helpful. And how you update it?
try to call this after your change to update it. I use it to toggle svg pics display.
update(const QRectF &) ==>update( boundingRect() ); I assume you overrides boundingRect();