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

17th September 2012, 17:21
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!!

18th September 2012, 14: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