diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-05-08 16:56:55 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-16 15:29:41 +0000 |
commit | f228af06c2c712302ee1dcdaf761cd24504b473e (patch) | |
tree | 5dcb688d79448d84006dabe8caeecf41cf7bb1ca /tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro | |
parent | 7f7d87c68da4cb29b2b2b9c324c6863228da0c26 (diff) |
Add snapMode to DragHandler
This changes snap behavior slightly. Basically, it does not snap
anymore if the target() item is an ancestor of the parentItem().
In addition, we add a property that enables users to change the behavior.
(SnapIfPressedOutsideTarget has the old behavior)
[ChangeLog][QtQuick][Event Handlers] Added DragHandler.snapMode which can
be used to configure under which conditions the dragged item is snapped
to be below the cursor. The default mode is SnapAuto. The old behavior
can be obtained through the SnapIfPressedOutsideTarget mode.
Fixes: QTBUG-75661
Change-Id: Ibc00e8fbe31b779f8e817af1505e76425467d27a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro')
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro b/tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro index 42c4e46c4f..6258fb9392 100644 --- a/tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro +++ b/tests/auto/quick/pointerhandlers/qquickdraghandler/qquickdraghandler.pro @@ -19,3 +19,4 @@ OTHER_FILES += data/DragAnywhereSlider.qml \ data/grabberstate.qml \ data/multipleSliders.qml \ data/reparenting.qml \ + data/snapMode.qml \ |