diff options
author | Matthias Rauter <matthias.rauter@qt.io> | 2023-02-27 10:51:33 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-01 14:42:20 +0000 |
commit | 6e1b10c09ad19ba20a60d320afb40575204430d5 (patch) | |
tree | 48653c04b045a3608657cf021a6c271f4bc27bb9 | |
parent | efc8c6ab0b6e40c96f073ced05523fb89554ad19 (diff) | |
download | qtlocation-6e1b10c09ad19ba20a60d320afb40575204430d5.tar.gz |
Replace MouseArea with TapHandler in Planespotter example
Change-Id: Ib5e02e914090a22183230cdd128fbcba608d82fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 07ac2096ce088c6ce3e5d692e5048b89364173af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/location/planespotter/doc/src/planespotter.qdoc | 2 | ||||
-rw-r--r-- | examples/location/planespotter/planespotter.qml | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/examples/location/planespotter/doc/src/planespotter.qdoc b/examples/location/planespotter/doc/src/planespotter.qdoc index bed5f597..394ad1d0 100644 --- a/examples/location/planespotter/doc/src/planespotter.qdoc +++ b/examples/location/planespotter/doc/src/planespotter.qdoc @@ -111,7 +111,7 @@ \snippet planespotter/planespotter.qml QmlPlane1 - The \l MouseArea of the QML plane implements the logic for the course setting + The \l TapHandler of the QML plane implements the logic for the course setting and starts the animation when required. \snippet planespotter/planespotter.qml QmlPlane2 diff --git a/examples/location/planespotter/planespotter.qml b/examples/location/planespotter/planespotter.qml index 89384d5d..3cb3085b 100644 --- a/examples/location/planespotter/planespotter.qml +++ b/examples/location/planespotter/planespotter.qml @@ -64,9 +64,8 @@ Window { } //! [QmlPlane2] - MouseArea { - anchors.fill: parent - onClicked: { + TapHandler { + onTapped: { if (qmlPlaneAnimation.running) { console.log("Plane still in the air."); return; @@ -96,9 +95,8 @@ Window { pilotName: "C++" coordinate: berlin2London.position - MouseArea { - anchors.fill: parent - onClicked: { + TapHandler { + onTapped: { if (cppPlaneAnimation.running || berlin2London.isFlying()) { console.log("Plane still in the air."); return; |