summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Erb <erb@suitabletech.com>2017-03-02 21:15:56 -0500
committerJason Erb (Suitable Technologies) <erb@suitabletech.com>2017-03-06 19:05:29 +0000
commit9a56985c91d16d7c42ba86f4b0a70f85973e0618 (patch)
tree4385c2ae0b2f8e73fdd8a2d6cc9f6fc7edd2f477 /src
parent43d417b127215f53cb01ac14a558fec705fbf4ad (diff)
downloadqtquickcontrols-9a56985c91d16d7c42ba86f4b0a70f85973e0618.tar.gz
Slider: add property to disable scroll wheel
Add a property to disable the scroll wheel for the Slider. This is useful if there is a scrollable list of sliders, because scrolling would be interrupted as soon as the mouse gets above a slider (whereby scrolling would change the slider value). By setting this property to false, a user can easily scroll through the list. [ChangeLog][Slider] add property to disable scroll wheel Task-number: QTBUG-59271 Change-Id: I9306638ef98f8a0a5035709a67cc1ee40713441a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/controls/Slider.qml10
-rw-r--r--src/controls/plugin.cpp4
2 files changed, 13 insertions, 1 deletions
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index 4023929a..d55e81a3 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -171,6 +171,16 @@ Control {
*/
property bool tickmarksEnabled: false
+ /*!
+ \qmlproperty bool Slider::wheelEnabled
+
+ This property determines whether the control handles wheel events.
+ The default value is \c true.
+
+ \since QtQuick.Controls 1.6
+ */
+ property alias wheelEnabled: wheelarea.enabled
+
/*! \internal */
property bool __horizontal: orientation === Qt.Horizontal
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 528f05a8..0d60ec56 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -122,7 +122,9 @@ static const struct {
{ "TreeView", 1, 4 },
{ "TextArea", 1, 5 },
- { "TreeView", 1, 5 }
+ { "TreeView", 1, 5 },
+
+ { "Slider", 1, 6 }
};
QtQuickControls1Plugin::QtQuickControls1Plugin(QObject *parent) : QQmlExtensionPlugin(parent)