diff options
author | Paul Wicking <paul.wicking@qt.io> | 2020-09-08 08:23:36 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2020-09-10 18:26:39 +0200 |
commit | e7c15a60ea787ffe5e5b2dcd0c0f7c875553b11c (patch) | |
tree | 6a4e2b13cdef3de3f5ff04495901318385c61d44 /src/widgets/doc/src | |
parent | 8a2ca17b2dcd4947c8777fbc4ec2b086b764f39b (diff) |
Doc: Clean up widget snippets project
The main snippets project must be a subdirs project.
Move some files and update the affected documentation.
Task-number: QTBUG-86497
Pick-to: 5.15
Change-Id: I60073d1b8bd53aa09600eeccf06ba8457ac7c708
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src/widgets/doc/src')
-rw-r--r-- | src/widgets/doc/src/graphicsview.qdoc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/doc/src/graphicsview.qdoc b/src/widgets/doc/src/graphicsview.qdoc index 2dfad442a3..bd95e88b20 100644 --- a/src/widgets/doc/src/graphicsview.qdoc +++ b/src/widgets/doc/src/graphicsview.qdoc @@ -89,7 +89,7 @@ descending stacking order (i.e., the first returned item is topmost, and the last item is bottom-most). - \snippet graphicsview.cpp 0 + \snippet graphicsview/graphicsview.cpp 0 QGraphicsScene's event propagation architecture schedules scene events for delivery to items, and also manages propagation between items. If @@ -120,7 +120,7 @@ enable OpenGL support, you can set a QOpenGLWidget as the viewport by calling QGraphicsView::setViewport(). - \snippet graphicsview.cpp 1 + \snippet graphicsview/graphicsview.cpp 1 The view receives input events from the keyboard and mouse, and translates these to scene events (converting the coordinates used @@ -327,7 +327,7 @@ Here is an example of how to implement zoom and rotate slots in a subclass of QGraphicsView: - \snippet graphicsview_snippet.cpp 2 + \snippet graphicsview/graphicsview_snippet.cpp 2 The slots could be connected to \l{QToolButton}{QToolButtons} with \l{QAbstractButton::autoRepeat}{autoRepeat} enabled. @@ -347,7 +347,7 @@ a QPainter to either of the rendering functions. This example shows how to print the whole scene into a full page, using QPrinter. - \snippet graphicsview.cpp 3 + \snippet graphicsview/graphicsview.cpp 3 The difference between the scene and view rendering functions is that one operates in scene coordinates, and the other in view coordinates. @@ -358,7 +358,7 @@ is to render the exact contents of the viewport using the provided painter. - \snippet graphicsview.cpp 4 + \snippet graphicsview/graphicsview.cpp 4 When the source and target areas' sizes do not match, the source contents are stretched to fit into the target area. By passing a @@ -384,7 +384,7 @@ so in mousePressEvent() or mouseMoveEvent(), you can get the originating widget pointer from the event. For example: - \snippet graphicsview.cpp 5 + \snippet graphicsview/graphicsview.cpp 5 To intercept drag and drop events for the scene, you reimplement QGraphicsScene::dragEnterEvent() and whichever event handlers your @@ -443,7 +443,7 @@ Example: - \snippet graphicsview.cpp 6 + \snippet graphicsview/graphicsview.cpp 6 \section2 Item Groups |