Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.4, 6.1.0
-
None
-
36f75c0a1b0145b50f24db397a641c1760cb351a (qt/tqtc-qtdeclarative/5.15)
Description
I am not sure if this is a bug or if I am missing something. I am trying to prevent the inner `TapHandler` tap event to propagate to the outer one. From the documentation it sounds like setting `eventPoint.accepted = true` should have done it. However that does not seem to be the case.
For example, here both rectangles change color instead of just the inner one when you tap (click) the inner one:
import QtQuick 2.15 import QtQuick.Controls 2.15Rectangle { id: outer color: "red" anchors.fill: parent TapHandler { onTapped: outer.color = "green" } Rectangle { id: inner width: parent.width / 2 height: parent.height / 2 color: "blue" anchors.centerIn: parent TapHandler { onTapped: { inner.color = "yellow"; eventPoint.accepted = true } } } }
(might be related to QTBUG-94012)
Attachments
For Gerrit Dashboard: QTBUG-94016 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
351042,2 | docs: Clarify EventPoint properties | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |