From 9aa0e84d974d86cf9366714107e9c84dcde15490 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Fri, 23 Dec 2016 15:35:43 +0100 Subject: Add a DragHandler::translation property This allows the application developer to get the translation of the dragged pointer, and apply it in a custom way. This should usually be combined with setting target to null. This will for instance be needed when we want to drag QtLocations map, where a map is dragged by specifying the geo location of the center of the map. The map2.qml example demonstrates this. Change-Id: I652d9fc92fa9b6dfd3796c7147832f25af0cc5bc Reviewed-by: Shawn Rutledge --- tests/manual/pointer/main.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/manual/pointer/main.qml') diff --git a/tests/manual/pointer/main.qml b/tests/manual/pointer/main.qml index 7ba0d9a466..64b7148bd2 100644 --- a/tests/manual/pointer/main.qml +++ b/tests/manual/pointer/main.qml @@ -54,6 +54,7 @@ Window { addExample("mixer", "mixing console", Qt.resolvedUrl("mixer.qml")) addExample("pinch", "PinchHandler: scale, rotate and drag", Qt.resolvedUrl("pinchHandler.qml")) addExample("map", "scale and pan", Qt.resolvedUrl("map.qml")) + addExample("custom map", "scale and pan", Qt.resolvedUrl("map2.qml")) } } } -- cgit v1.2.3