diff options
author | Jason Erb <erb@suitabletech.com> | 2017-03-02 21:15:56 -0500 |
---|---|---|
committer | Jason Erb (Suitable Technologies) <erb@suitabletech.com> | 2017-03-06 19:05:29 +0000 |
commit | 9a56985c91d16d7c42ba86f4b0a70f85973e0618 (patch) | |
tree | 4385c2ae0b2f8e73fdd8a2d6cc9f6fc7edd2f477 /tests/auto/controls/data/tst_slider.qml | |
parent | 43d417b127215f53cb01ac14a558fec705fbf4ad (diff) | |
download | qtquickcontrols-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 'tests/auto/controls/data/tst_slider.qml')
-rw-r--r-- | tests/auto/controls/data/tst_slider.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml index 1d7e92d2..4cff6352 100644 --- a/tests/auto/controls/data/tst_slider.qml +++ b/tests/auto/controls/data/tst_slider.qml @@ -51,7 +51,7 @@ import QtQuick 2.6 import QtTest 1.0 import QtQuickControlsTests 1.0 -import QtQuick.Controls 1.4 +import QtQuick.Controls 1.6 import QtQuick.Controls.Private 1.0 import QtQuick.Controls.Styles 1.4 @@ -176,6 +176,13 @@ Item { slider.value = 0 mouseWheel(slider, 5, 5, -40 * ratio, 0) compare(slider.value, slider.maximumValue) + + // Mousewheel deactivated + slider.value = 0 + slider.wheelEnabled = false + mouseWheel(slider, 5, 5, 4 * ratio, 0) + compare(slider.value, 0) + slider.destroy() } |