Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.0 Beta3
-
None
Description
Observation
TapHandler with Passive Grab does not trigger QtQuick Controls 2 Button Click. The TapHandler is wrapped in an item to ensure it's an Item sibling of the Button and both are overlapping.
Expectation
Because the TapHandler creates only a passive grab, I've expected to get the CLICKED log entry.
Code
Item { anchors.fill: parent Button { objectName: "button" anchors.fill: parent onClicked: () => console.log("CLICKED"); } Item { objectName: "handlerContainer" anchors.fill: parent TapHandler { objectName: "tapHandler" gesturePolicy: TapHandler.DragThreshold onTapped: () => console.log("TAP"); } } }
qt.quick.handler.dispatch: "tapHandler" checking device type QFlags<QInputDevice::DeviceType>(AllDevices) pointer type QFlags<QPointingDevice::PointerType>(AllPointerTypes) modifiers QFlags<Qt::KeyboardModifier>(KeyboardModifierMask) qt.quick.handler.dispatch: QQuickTapHandler "tapHandler" on QQuickItem "handlerContainer" WANTS QMouseEvent(MouseButtonPress LeftButton pos=10,388 scn=10,388 gbl=-1149,495 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.tap: "tapHandler" pressed false -> true QEventPoint(id=0 ts=15269 pos=10,388 scn=10,388 gbl=-1149,495 Pressed vel=2.14629,-14.8594 press=10,388 last=10,388 ? 0,0) gp QQuickTapHandler::DragThreshold qt.quick.handler.grab: QQuickTapHandler(0x22bb389c070, name = "tapHandler") QEventPoint(id=0 ts=15269 pos=10,388 scn=10,388 gbl=-1149,495 Pressed vel=2.14629,-14.8594 press=10,388 last=10,388 ? 0,0) true via QQuickDeliveryAgent(root=QQuickRootItem) qt.quick.handler.grab: QEventPoint(id=0 ts=15269 pos=10,388 scn=10,388 gbl=-1149,495 Pressed vel=2.14629,-14.8594 press=10,388 last=10,388 ? 0,0) QPointingDevice::GrabPassive QQuickTapHandler(0x22bb389c070, name = "tapHandler") qt.quick.mouse: QQuickDeliveryAgent(root=QQuickRootItem) QMouseEvent(MouseButtonRelease LeftButton pos=10,388 scn=10,388 gbl=-1149,495 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.dispatch: "tapHandler" checking device type QFlags<QInputDevice::DeviceType>(AllDevices) pointer type QFlags<QPointingDevice::PointerType>(AllPointerTypes) modifiers QFlags<Qt::KeyboardModifier>(KeyboardModifierMask) qt.quick.handler.dispatch: QQuickTapHandler "tapHandler" on QQuickItem "handlerContainer" WANTS QMouseEvent(MouseButtonRelease LeftButton pos=10,388 scn=10,388 gbl=-1149,495 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.tap: "tapHandler" pressed true -> false QEventPoint(id=0 ts=15355 pos=10,388 scn=10,388 gbl=-1149,495 Released vel=0.643887,-4.45783 press=10,388 last=10,388 ? 0,0) gp QQuickTapHandler::DragThreshold qt.quick.handler.tap: "tapHandler" tapped 1 times qml: TAP qt.quick.handler.grab: QEventPoint(id=0 ts=15355 pos=10,388 scn=10,388 gbl=-1149,495 Released vel=0.643887,-4.45783 press=10,388 last=10,388 ? 0,0) QPointingDevice::UngrabPassive QQuickTapHandler(0x22bb389c070, name = "tapHandler")
Notes
- Enable "false" on the TapHandler makes the Button react again
- QTBUG-96030 describes the same issue with MouseArea
Attachments
Issue Links
- relates to
-
QTBUG-96030 TapHandler PassiveGrab prohibits event propagation to MouseArea click
-
- Reported
-