PDA

View Full Version : Painting vector graphics...



Muffin
5th November 2009, 08:09
Hi

I'm working on this application where i have a QGraphicsView and QGraphicsScene with QGraphicsSvgItems on and would like to draw lines/curves etc between the QGraphicsSvgItem that i have in the scene.

I'm unable to find (or understand how) a way to render/paint these lines in in my scene and it has to be scaleable graphics like the QGraphicsSvgItem i have in my scene.

anyone that could point me in the right direction?

/Robert

jano_alex_es
5th November 2009, 08:23
Please note QGraphicsSvgItems inherits from QGraphicsItem, so you should have the possibility to add them into the scene with QGraphicsScene::addItem ( QGraphicsItem * item )

Muffin
5th November 2009, 08:54
Yes i know, you can acctualy add a QGraphicsSvgItems to the scene without using the QGraphicsItem base class. It works anyway.

but that was not my problem, it was draw lines between the svg items in my scene. But that has been resolved by using the QPainterPath and add that to my scene. I was under the impression that it would be drawn in pixels but aparently not.... so the issue is resolved... well this issue anyway ;)

Thanks for a quick reply :)

/Robert