diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-07 12:21:07 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-07 11:08:08 +0000 |
commit | bd1080e6a1c78bc65d01f5504bec82ad971d866f (patch) | |
tree | 159b2417bac42fe4c80bcf6eaa803ac713f883d4 /src/quicktemplates2 | |
parent | 59813165989da88f7d4ecec97f952b691636d683 (diff) |
Slider: fix documentation review findings
Expand detailed description.
Also updated the GIF after the styling changes, and removed the PNGs.
Change-Id: I6dee232f6766d6ee9595b1043a4bca78c2a09d78
Task-number: QTBUG-55904
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r-- | src/quicktemplates2/qquickslider.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp index d01f26b9..e0df7e69 100644 --- a/src/quicktemplates2/qquickslider.cpp +++ b/src/quicktemplates2/qquickslider.cpp @@ -54,21 +54,24 @@ QT_BEGIN_NAMESPACE Slider is used to select a value by sliding a handle along a track. - \table - \row \li \image qtquickcontrols2-slider-normal.png - \li A slider in its normal state. - \row \li \image qtquickcontrols2-slider-focused.png - \li A slider that has active focus. - \row \li \image qtquickcontrols2-slider-disabled.png - \li A slider that is disabled. - \endtable + In the example below, custom \l from, \l value, and \l to values are set: \code Slider { - value: 0.5 + from: 1 + value: 25 + to: 100 } \endcode + The \l position property is defined as a percentage of the control's size, + scaled within the range \c {0.0 - 1.0}. The \l visualPosition property is + the same, except that it is reversed in a + \l {Right-to-left User Interfaces}{right-to-left} application. The + visualPosition is useful for positioning the handle when styling Slider. + In the example above, \l visualPosition will be \c 0.24 in a left-to-right + application, and \c 0.76 in a right-to-left application. + \sa {Customizing Slider}, {Input Controls} */ |