Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12
-
None
-
a6e196ce9 (dev), ae7069bfa (6.5), dd3484343 (6.5.0), b0bb5823e (6.4), a8fb5c36c (tqtc/lts-6.2)
Description
When multiple (map)items are overlapping, and have tap handlers inside, clicking on one will make all of them fire
import QtQuick 2.12 import QtQuick.Window 2.12 import QtLocation 5.12 import QtPositioning 5.5 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Map { anchors.fill: parent plugin: Plugin { name: "osm" } zoomLevel: 4.3 center: QtPositioning.coordinate(19.5,19.5) MapQuickItem { sourceItem: Rectangle { id: rct width: 48 height: 48 color: "firebrick" // MouseArea { // works // anchors.fill: parent // onPressed: console.log("pressed") // onReleased: console.log("released") // } TapHandler { // doesnt work onPressedChanged: { if (pressed) console.log("pressed") else console.log("released") } } } coordinate: QtPositioning.coordinate(20, 20) anchorPoint.x: rct.width/2 anchorPoint.y: rct.height } MapQuickItem { sourceItem: Rectangle { id: rct2 width: 48 height: 48 color: "firebrick" // MouseArea { // works // anchors.fill: parent // onPressed: console.log("pressed") // onReleased: console.log("released") // } TapHandler { // doesnt work onPressedChanged: { if (pressed) console.log("pressed2") else console.log("released2") } } } coordinate: QtPositioning.coordinate(19, 19) anchorPoint.x: rct2.width/2 anchorPoint.y: rct2.height } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-100534 TapHandler doesn't stop propagation
- Reported
- relates to
-
QTBUG-73262 it's confusing that TapHandler.gesturePolicy affects event propagation
- Reported
-
QTBUG-96030 TapHandler PassiveGrab prohibits event propagation to MouseArea click
- Reported
-
QTBUG-107239 DragHandler propagates tap event through Flickable to underlying TapHandler
- Reported