[Qt-interest] qsvg
Alessandro Portale
Alessandro.Portale at trolltech.com
Thu Feb 12 09:05:23 CET 2009
Hi,
there is a render() overload in QSvgRenderer that allows You to also
specify an element Id:
http://doc.trolltech.com/latest/qsvgrenderer.html#render-3
If you prepare your SVG document in a way that the top level element of
each card has a special id, you can use that Id to address a specific card.
Alessandro
qt at tonyobryan.com wrote:
> I'm trying to use the QSvg classes, but can't figure out an easy to way
> to accomplish what I'm after. I'm making a card game using KDE's card
> decks, which are compressed SVG files. For simplicity, I'm decompressing
> the card deck ahead of time, so I just have the plain XML files to load.
>
> I can load the entire file into a single widget, but I can't see an easy
> way to isolate individual cards. It seems that Qt's SVG support is all
> or nothing, and that it doesn't have a way to display just one image
> from a multi-image SVG file.
>
> Am I missing something? Does Qt provide a way for me to selectively
> render arbitrary images from an SVG file that contains multiple images?
More information about the Qt-interest-old
mailing list