summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp')
-rw-r--r--doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp
new file mode 100644
index 0000000..f0846e6
--- /dev/null
+++ b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp
@@ -0,0 +1,11 @@
+//! [0]
+QSvgRenderer *renderer = new QSvgRenderer(QLatin1String("SvgCardDeck.svg"));
+QGraphicsSvgItem *black = new QGraphicsSvgItem();
+QGraphicsSvgItem *red = new QGraphicsSvgItem();
+
+black->setSharedRenderer(renderer);
+black->setElementId(QLatin1String("black_joker"));
+
+red->setSharedRenderer(renderer);
+red->setElementId(QLatin1String("red_joker"));
+//! [0]