summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Rauter <matthias.rauter@qt.io>2023-02-27 10:51:33 +0100
committerMatthias Rauter <matthias.rauter@qt.io>2023-03-01 13:29:53 +0100
commit07ac2096ce088c6ce3e5d692e5048b89364173af (patch)
treea4d80b1ddf6f5e806c3cc814447033a2661dc2d6
parent95e2cae51e6c92315fbf33c5d3e8a1826cca8907 (diff)
downloadqtlocation-07ac2096ce088c6ce3e5d692e5048b89364173af.tar.gz
Replace MouseArea with TapHandler in Planespotter example
Pick-to: 6.5 Change-Id: Ib5e02e914090a22183230cdd128fbcba608d82fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--examples/location/planespotter/doc/src/planespotter.qdoc2
-rw-r--r--examples/location/planespotter/planespotter.qml10
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;