summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads/doc/src/mandelbrot.qdoc
diff options
context:
space:
mode:
authorNicholas Bennett <nicholas.bennett@qt.io>2022-05-25 11:03:05 +0300
committerRami Potinkara <rami.potinkara@qt.io>2022-07-21 08:38:44 +0300
commitfc5482cac6e69364c9d09fb8d994065e2a5fb542 (patch)
tree9966a986452209566b4f5ff5fd13230dded51157 /examples/corelib/threads/doc/src/mandelbrot.qdoc
parenteb9ace1cee4bb48005797b0b2d2d3d576a4cb4ce (diff)
Support pinch zoom gesture in the Mandelbrot example
Used QGesture for this as per the gesture example. Moved the help and info text to separate lines. Enabled word wrap to prevent text going off screen. As a drive-by, the code to center the window at a size that's a fraction of the screen is replaced with a simple sizeHint() override. The user should have control over placement, particularly now that it should be placed manually onto a touchscreen if the user has one. Done-with: Shawn Rutledge Fixes: QTBUG-96702 Pick-to: 6.4 Change-Id: I8dba8b09bed474f585341e9a7a8c71fb60293eee Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/corelib/threads/doc/src/mandelbrot.qdoc')
-rw-r--r--examples/corelib/threads/doc/src/mandelbrot.qdoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/corelib/threads/doc/src/mandelbrot.qdoc b/examples/corelib/threads/doc/src/mandelbrot.qdoc
index aaa6356a2c..b8a5930d8c 100644
--- a/examples/corelib/threads/doc/src/mandelbrot.qdoc
+++ b/examples/corelib/threads/doc/src/mandelbrot.qdoc
@@ -303,6 +303,11 @@
\snippet threads/mandelbrot/mandelbrotwidget.cpp 13
+ Pinch to zoom has been implemented with QGesture as outlined in
+ \l{Gestures in Widgets and Graphics View}.
+
+ \snippet threads/mandelbrot/mandelbrotwidget.cpp gesture1
+
When the user presses the left mouse button, we store the mouse
pointer position in \c lastDragPos.