PDA

View Full Version : How can I change the filename of a QGraphicsSvgItem



Hogwarts
17th September 2012, 16:21
Hello
I'm using QGraphicsSvgItem to display the pieces of a chess game. I need to change the SVG file asociated to a QGraphicsSvgItem, but I can't find a way to do this without creating a new QGraphicsSvgItem object. Is there another way?
Thanks is advanced!!

Hogwarts
18th September 2012, 13:16
After reading QtAssistant once again, I found that this can be achieve using the function: void QGraphicsSvgItem::setSharedRenderer ( QSvgRenderer * renderer )
This way I have not to create a new object of QGraphicsSvgItem
Thanks for yours replies. LOL