aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_slider.qml
Commit message (Collapse)AuthorAgeFilesLines
* Slider: fix wheel event propagationMassimo Callegari2019-01-081-0/+57
| | | | | | | | | Don't propagate wheel events when reaching the limits. Sync the behavior with Qt widgets and SpinBox/ComboBox. Task-number: QTBUG-72750 Change-Id: Iefb8562c1d9632badc4a39bc4c301bd96b8a515b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_slider.qml: add release of touchEventSequenceYulong Bai2018-03-141-0/+2
| | | | | | | | Add release of touchEventSequence in test_touchDragThreshold to avoid possible it is reused by other test cases. Change-Id: Ie0c8a53ede5d65effc1ee501d4428179f28d6734 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickSlider: add touchDragThreshold propertyYulong Bai2018-03-121-0/+60
| | | | | | | | | | | | | | | | | Add touchDragThreshold property for configuring the threshold to initiate a 'drag', i.e. touch move, of the handle of the slider. The mouse 'drag' won't be affected by the property. This property may be also used to configure the drag events stealing priorities of nested draggable items in the future. [ChangeLog][Slider] Added touchDragThreshold property for configuring the threshold to initiate the touch 'drag' of the handle of the slider. The mouse 'drag' won't be affected by the property. Task-number: QTBUG-62784 Change-Id: Ifaeea4653b48c44efbe7e1cb09d399a91359c16a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-2/+4
|\ | | | | | | Change-Id: Ide4b85626dd153b534c39a3afa2f3b9e732badf5
| * Fix QQuickSlider::valueAt()J-P Nurmi2017-11-071-2/+4
| | | | | | | | | | | | Task-number: QTBUG-64065 Change-Id: Id77a85ce5b88c20795e9f7fe9d2ece974f46a315 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-04-271-0/+13
|\| | | | | | | Change-Id: I47fbec425594386f529623f2dcbddd7ec7a09ee7
| * tst_slider & tst_dial: add simple tests for null handlesJ-P Nurmi2017-04-241-0/+13
| | | | | | | | | | | | | | | | Just to ensure that these corner cases are also tested. We should not assume that the handle visuals exist, so these tests must not crash. Change-Id: I3dbf6ec78667bd9e99b3de79ffa8109858f9edd5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-04-211-1/+0
|\| | | | | | | | | | | | | | | Conflicts: src/imports/controls/RoundButton.qml src/imports/controls/universal/RadioDelegate.qml Change-Id: I4cb14c19bd5f6e19b70b03fb394c76712e6dda08
| * tst_controls: remove waitForRendering() from test_multiTouchJ-P Nurmi2017-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | Not sure why this was added in the first place. Now it has been copied to all test_multiTouch() implementations and sometimes slows down the test round quite a bit. Change-Id: I76e259e0267b34de6432998385b9f2e6759b9819 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-04-061-29/+25
|\| | | | | | | | | | | | | Conflicts: src/imports/templates/qtquicktemplates2plugin.cpp Change-Id: I4a07d331163a85a0fb98a5f58f3970863f8da0fc
| * Slider: react immediately when using a mouseJ-P Nurmi2017-04-051-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. Changing the behavior is simple, but auto tests need quite many tweaks so RangeSlider and Dial will be done separate follow up changes. [ChangeLog][Important Behavior Changes] Sliders and Dials now react immediately when using a mouse. Now the initial drag threshold applies only on touch, to avoid conflicting with flickables. Task-number: QTBUG-59920 Change-Id: Ifc1e6ed74c7894c3c854c975dff5238278827590 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * auto tests: utilize TestCase::fuzzyCompare()J-P Nurmi2017-04-051-14/+10
| | | | | | | | | | Change-Id: I9c3f7997a14bd1824663c7521061c4ee43d6380e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Slider: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-281-0/+7
|/ | | | | | | | | [ChangeLog][Controls][Slider] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Iec3332f873e482590ab4f0cca08323c905527c77 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-241-2/+12
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default QQuickSlider::live to trueJ-P Nurmi2017-01-271-5/+5
| | | | | | | | | [ChangeLog][Important Behavior Changes] On a popular demand, Slider has been changed to report live value updates. This can be disabled by setting Slider::live to false. Change-Id: I48c6a92eb794d2846cfff96d8784c53c22843573 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_control: fix TestCase::mouseMove() usageJ-P Nurmi2017-01-121-8/+8
| | | | | | | | | TestCase::mouseMove() does not take a mouse button argument. What we intended to pass as a button argument, was actually used as a 1ms delay (the value of Qt.LeftButton is 1). Change-Id: I5e6e6b05a521702e99418cceba2d0a7cdbc68109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSlider: handle touch eventsJ-P Nurmi2017-01-031-1/+210
| | | | | | | | | | | | | | | | | | | | In comparison to handling synthesized mouse events, handling touch events has the advantage that it gives multi-touch support. That is, it is possible to move multiple sliders at the same time, each handling its own touch point. Change-Id: I713307b0e6b5ee777496fc9ba68a5180d13a6aca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_slider: use TestCase's new createTemporaryObject functionsMitch Curtis2016-12-201-40/+14
| | | | | | | | | | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Ia0030b9ea7228dad242e29a439e3859dc0846229 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add Slider::moved() signalJ-P Nurmi2016-11-291-9/+61
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Slider] Added a moved() signal that is emitted whenever the slider is interactively moved by the user by using either touch, mouse, wheel, or keys. Task-number: QTBUG-57203 Change-Id: Iec1ed1342b004e396881e6eb48d694afdd10b648 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-111-16/+6
|\| | | | | | | Change-Id: I6a3a103e702dfa25c8ac1702be92faf3bb2b01d7
| * Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-071-16/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml src/quicktemplates2/qquickmenu.cpp tests/auto/controls/data/tst_buttongroup.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ib6042a0ad716f557927e7412d17ea8957d06c015
| | * auto tests: prefer creating signal spies locally where neededJ-P Nurmi2016-10-071-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is tedious to always add new static SignalSpy instances for each tested signal. Just create signal spies locally in the same place where they are used. This makes it much more convenient to create more signal spies to achieve better coverage. This practice has been already used in newly written tests. Change-Id: I7f56c4b3cea0c55c34b85254f69a88ec73b8607f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add QQuickSlider::liveJ-P Nurmi2016-10-051-8/+10
|/ / | | | | | | | | | | | | | | | | [ChangeLog][Controls][Slider] Added a live-property that determines whether the slider provides live updates for the value-property while the handle is dragged. Change-Id: Ib393548f80be4db57a977eac39d5d560ca441f3c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-201-4/+10
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontainer.cpp Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865
| * Fix QQuickSliderPrivate::snapPosition()J-P Nurmi2016-06-161-4/+10
| | | | | | | | | | | | | | | | | | The correct formula for calculating the "range" or "span" is to-from, not from+(to-from), which is used in the formula for calculating value. Change-Id: I9df0561de8fb759dc83ea052917aeba1529c89a4 Task-number: QTBUG-54140 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-141-0/+6
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickslider.cpp Change-Id: Idefd7b77b1937d423ee2db5064ff09c36b240ef0
| * Fix Slider to react if only clickedJ-P Nurmi2016-06-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea was to avoid accidental value changes while flicking over a slider, but that case should be covered well enough by handling mouseUngrabEvent(). [ChgangeLog][Important Behavior Changes] Slider has been fixed to react to clicks. Task-number: QTBUG-53846 Change-Id: I0d52f805af8867655945c57ad77ccb85704a4462 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Slider: expose valueAt(pos) for getting continuous value updatesJ-P Nurmi2016-06-131-1/+21
|/ | | | | | | | | [ChangeLog][Slider] Added valueAt() method for getting continuous value updates. Task-number: QTBUG-53847 Change-Id: I0aa813c7105faa64b714ab0a0630f79d97a58854 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Slider: add wheel supportJ-P Nurmi2016-02-241-0/+47
| | | | | | Change-Id: I413d8c853bfe3cc748584dfebd28172ead89d638 Task-number: QTBUG-50221 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Slider: fix stepSize handling when snapping is enabledJ-P Nurmi2016-02-081-0/+32
| | | | | | | | | | | The value range and step size are configurable, whereas position is always in the range [0.0..1.0]. The snap handling was applying step size to the position as is, without taking the value range into account. Thus, snapping worked correctly only for the default [0.0..1.0] value range, which happens to match with the position range. Change-Id: If2f48d36c95554de25598d507842576a49e643b9 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove Control::layoutDirectionJ-P Nurmi2015-12-091-4/+12
| | | | | | | | Calculate QQuickControl::isMirrored() from LayoutMirroring.enabled (QQuickItemPrivate::isMirrored()) and QLocale::textDirection(). Change-Id: I0e391d27df732734031f3e94d9828a1a2cfa7474 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix Slider position calculation to take paddings into accountJ-P Nurmi2015-10-031-0/+73
| | | | | | | | | When Slider had paddings set, the handle didn't follow the touch point / mouse cursor. The larger paddings were set, the more the handle was "off". Change-Id: I82d97092a2c3fc99cba108fe011a463a571e5507 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-011-1/+1
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Enums are now available using the QML composite type nameJ-P Nurmi2015-09-231-2/+1
| | | | | | | Change-Id: I90cf20d57ee433c1c9319c7a947ac91558775bb7 Task-number: QTBUG-43582 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Use QtQuick.TemplatesJ-P Nurmi2015-09-091-1/+2
| | | | | Change-Id: I3d1822457efd740e7c9d91747e978d787c0dd4b8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Cleanup & improve auto testsJ-P Nurmi2015-06-291-9/+31
| | | | | | | | | - always verify component creation to catch errors early - remove empty init() and cleanup() functions - remove redundant "defaults" checks Change-Id: I39f16404fa2e3d3e38348742afd8f51ea36b2f05 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Slider: add from & to propertiesJ-P Nurmi2015-06-111-0/+78
| | | | | Change-Id: Iee61e89d8519e7e3d27f1bf1c35af210f48bc7c9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Promote layoutDirection & effectiveLayoutDirection to ControlJ-P Nurmi2015-05-221-28/+0
| | | | | Change-Id: I44df09c17d6d20cfd929af4e331e15f48b19587e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix tst_sliderJ-P Nurmi2015-04-151-4/+6
| | | | | Change-Id: I37e2ab2c1f64f907b5895f41ee278b58af4e2655 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-041-22/+26
| | | | | Change-Id: Ia1556502ece0bc385375e61653169bdc855f592e Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>
* Import the Qt Quick Controls 2 prototypeJ-P Nurmi2015-02-051-0/+283
Change-Id: Ib8c0c4160958e5cfea29a6e9df1b3f1fb19715fc Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>