aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickrangeslider.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-19 20:44:35 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-19 20:46:59 +0200
commita451c1a4ad20320a096e997c7173a3c61e8051d4 (patch)
tree935f7bcf494b0088b16464883f111e8241ab6e28 /src/quicktemplates2/qquickrangeslider.cpp
parentdba57ed6f4c9fda4b6fd8b1aa1d61c31dcebd85e (diff)
parent124dd9adb5882048e44dcd012e08899d4e480196 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Diffstat (limited to 'src/quicktemplates2/qquickrangeslider.cpp')
-rw-r--r--src/quicktemplates2/qquickrangeslider.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp
index c2003831..83f34b5b 100644
--- a/src/quicktemplates2/qquickrangeslider.cpp
+++ b/src/quicktemplates2/qquickrangeslider.cpp
@@ -56,13 +56,27 @@ QT_BEGIN_NAMESPACE
RangeSlider is used to select a range specified by two values, by sliding
each handle along a track.
+ In the example below, custom \l from and \l to values are set, and the
+ initial positions of the \l first and \l second handles are set:
+
\code
RangeSlider {
- first.value: 0.25
- second.value: 0.75
+ from: 1
+ to: 100
+ first.value: 25
+ second.value: 75
}
\endcode
+ The \l {first.position} and \l {second.position} properties are defined as a
+ percentage of the control's size, scaled within the range \c {0.0 - 1.0}.
+ The \l {first.visualPosition} and \l {second.visualPosition} properties are
+ the same, except that they are reversed in a
+ \l {Right-to-left User Interfaces}{right-to-left} application.
+ The \c visualPosition is useful for positioning the handles when styling
+ RangeSlider. In the example above, \l {first.visualPosition} will be \c 0.24
+ in a left-to-right application, and \c 0.76 in a right-to-left application.
+
\sa {Customizing RangeSlider}, {Input Controls}
*/
@@ -602,6 +616,9 @@ void QQuickRangeSlider::setStepSize(qreal step)
\value RangeSlider.SnapAlways The slider snaps while the handle is dragged.
\value RangeSlider.SnapOnRelease The slider does not snap while being dragged, but only after the handle is released.
+ For visual explanations of the various modes, see the
+ \l {Slider::}{snapMode} documentation of \l Slider.
+
\sa stepSize
*/
QQuickRangeSlider::SnapMode QQuickRangeSlider::snapMode() const