From 8688f2d4abacf8057701b2b16f71f73be76af3c0 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 29 Nov 2017 13:49:27 +0100 Subject: Doc: add doc to Anchor Layout Example Task-number: QTBUG-60635 Change-Id: Iec6cae8c3caeac4bfabddae79b6ed2b47c5f2edf Reviewed-by: Frederik Gladhorn --- .../widgets/doc/src/graphicsview-anchorlayout.qdoc | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'examples') diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc index 95717340d1..bd27a0dc4f 100644 --- a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc +++ b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc @@ -35,4 +35,47 @@ class. \image graphicsanchorlayout-example.png + + The basic steps of this example are: + \list + \li Create a QGraphicsScene + \li Create widgets + \li Create a QGraphicsAnchorLayout + \li Create a QGraphicsWidget + \li Add vertical and horizontal anchors between the widgets + \li View the scene with a QGraphicsView object + \endlist + + \section1 Creating a QGraphicsScene + + \quotefromfile graphicsview/anchorlayout/main.cpp + \skipto QGraphicsScene + \printuntil setSceneRect + + \section1 Creating Widgets + + \skipto QGraphicsProxyWidget + \printuntil *g + + \section1 Creating a Layout + + \skipto QGraphicsAnchorLayout + \printuntil l->setSpacing + + \section1 Creating a QGraphicsWidget + + \skipto QGraphicsWidget + \printuntil setLayout(l) + + \section1 Adding Anchors + + \skipto vertical + \printuntil l->addAnchor(f, Qt::AnchorRight + + \section1 Viewing the Scene with QGraphicsView + + \skipto scene.addItem + \printuntil view.show + + \sa {Simple Anchor Layout Example} */ -- cgit v1.2.3