aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickslider.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-10-07 11:34:15 +0200
committerMitch Curtis <mitch.curtis@qt.io>2016-10-07 11:08:01 +0000
commit59813165989da88f7d4ecec97f952b691636d683 (patch)
tree3e743f2a098b1cd4d418540273b089bc7820ff3d /src/quicktemplates2/qquickslider.cpp
parentffae0f0842c4a3b116c3d8d2a099c1da0d527264 (diff)
Slider: add GIFs to demonstrate snap modes
Change-Id: I19d436cd9b48e3ab2498029d4b306f6a0e9ff977 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickslider.cpp')
-rw-r--r--src/quicktemplates2/qquickslider.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index 2bae9e72..d01f26b9 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -327,6 +327,18 @@ void QQuickSlider::setStepSize(qreal step)
\value Slider.SnapAlways The slider snaps while the handle is dragged.
\value Slider.SnapOnRelease The slider does not snap while being dragged, but only after the handle is released.
+ In the following table, the various modes are illustrated with animations.
+ The movement of the mouse cursor and the \l stepSize (\c 0.2) are identical
+ in each animation.
+
+ \table
+ \header
+ \row \li \b Value \li \b Example
+ \row \li \c Slider.NoSnap \li \image qtquickcontrols2-slider-nosnap.gif
+ \row \li \c Slider.SnapAlways \li \image qtquickcontrols2-slider-snapalways.gif
+ \row \li \c Slider.SnapOnRelease \li \image qtquickcontrols2-slider-snaponrelease.gif
+ \endtable
+
\sa stepSize
*/
QQuickSlider::SnapMode QQuickSlider::snapMode() const