diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-25 01:00:10 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-25 01:00:11 +0100 |
commit | 9893e71cea5de10193376c1733db627ef0783614 (patch) | |
tree | 391fabceb9d4ff6ba5f3ff2c2ec42acb613eb4ef /tests/auto/quick/qquickitem2/data/mapCoordinates.qml | |
parent | 87e7203532d69e0aaa0898a972d1d90fa589d519 (diff) | |
parent | e1b4b267aa8c4d9c53e5af4def54f5e9e14e0103 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Icb61522fb41a35303bb3d201b344a0407f67f9a0
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/mapCoordinates.qml')
-rw-r--r-- | tests/auto/quick/qquickitem2/data/mapCoordinates.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml index 596dedab90..3e34633338 100644 --- a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml +++ b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml @@ -49,11 +49,21 @@ Item { return Qt.point(pos.x, pos.y) } + function mapAToBPoint(x, y) { + var pos = itemA.mapToItem(itemB, Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAFromB(x, y) { var pos = itemA.mapFromItem(itemB, x, y) return Qt.point(pos.x, pos.y) } + function mapAFromBPoint(x, y) { + var pos = itemA.mapFromItem(itemB, Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAToNull(x, y) { var pos = itemA.mapToItem(null, x, y) return Qt.point(pos.x, pos.y) @@ -69,11 +79,21 @@ Item { return Qt.point(pos.x, pos.y) } + function mapAToGlobalPoint(x, y) { + var pos = itemA.mapToGlobal(Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAFromGlobal(x, y) { var pos = itemA.mapFromGlobal(x, y) return Qt.point(pos.x, pos.y) } + function mapAFromGlobalPoint(x, y) { + var pos = itemA.mapFromGlobal(Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapOrphanToGlobal(x, y) { var obj = itemComponent.createObject(null); var pos = obj.mapToGlobal(x, y) |