diff options
author | Caroline Chao <caroline.chao@digia.com> | 2013-05-02 13:34:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-03 22:57:41 +0200 |
commit | 2e3dc46f73ce9514dfea4266c155cb6ac770becd (patch) | |
tree | 612ae3400acd38c7e4647c2d7bdf8ea2a055e52b /tests/auto/controls/data/tst_spinbox.qml | |
parent | c97e91098df1a3a4874ea9acdc968690e6b59986 (diff) | |
download | qtquickcontrols-2e3dc46f73ce9514dfea4266c155cb6ac770becd.tar.gz |
Autotest: add test for mouseWheel on SpinBox
Change-Id: I633467448dbae8518760d380b1f7d6bee33377ff
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_spinbox.qml')
-rw-r--r-- | tests/auto/controls/data/tst_spinbox.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index 9cf9676b..adad9199 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -442,6 +442,20 @@ Item { spinbox.destroy() } + function test_wheel() { + var spinbox = Qt.createQmlObject('import QtQuick.Controls 1.0; SpinBox {}', container, '') + spinbox.forceActiveFocus() + spinbox.minimumValue = 0 + spinbox.maximumValue = 99 + spinbox.value = 10 + mouseWheel(spinbox, 5, 5, 0, 120) + compare(spinbox.value, 11) + mouseWheel(spinbox, 5, 5, 0, -120) + mouseWheel(spinbox, 5, 5, 0, -120) + compare(spinbox.value, 9) + spinbox.destroy() + } + function setCoordinates(item) { mainCoord.x = item.x + 1 |