PDA

View Full Version : is it possible to obtain the svg data from QgraphicsSvgItem?



sanjayshelke
10th November 2009, 09:00
hi,

I have created QGraphicsSVgObject using svg file name.
Once the object is created we no longer required physical file.

But is there any way to get this svg data from the available QGraphicsSvgItem?

Thanks in advance.

Regards,
~Sanjay

yogeshgokul
10th November 2009, 09:30
But is there any way to get this svg data from the available QGraphicsSvgItem?
No there is no such interface provided.

high_flyer
10th November 2009, 09:50
What information do you need from the object?
You can access the it through:
QGraphicsSVgObject::renderer()

sanjayshelke
10th November 2009, 10:06
i need svg file contents from which the svg object was created.

I was thinking that either QGraphicsSVgItem or QSvgRenderer might have some interface which gives us svg file data.

But i could not find anything.

high_flyer
10th November 2009, 10:54
You can load it with QFile in to a QString, and use that.

yogeshgokul
10th November 2009, 11:25
You can load it with QFile in to a QString, and use that.
He want to access it trough QGraphicsSvgItem instead directly.



But is there any way to get this svg data from the available QGraphicsSvgItem?

sanjayshelke
11th November 2009, 06:24
ok. Thanks a lot for your replies.

But there is no way to obtain the actual xml data from QGraphicsSVgItem or QSVGRenderer.

Hogwarts
22nd February 2011, 14:50
I need the same thing, access the svg data trough QGraphicsSvgItem instead directly.