[Interest] Preventing Apple Pencil to be grabbed by a PointHandler when a Flickable is on top
Nuno Santos
nuno.santos at imaginando.pt
Mon Oct 20 18:02:09 CEST 2025
Hi,
I’m having a problem while handling Apple Pencil events.
If it is interacting with a Flickable that has a PointHandler below, it gets picked by the PointHandler too. This does not happen with TouchEvents or MouseEvents?
What’s the solution for this?
Below is a small example that demonstrates the problem.
Thanks in advance!
Regards,
Nuno
Window {
id: root
width: 1024
height: 768
visible: true
color: "lightgrey"
//visibility: Window.Hidden
//Component.onCompleted: show()
Rectangle {
width: parent.width * 0.5
height: parent.height * 0.5
x: parent.width * 0.25
y: parent.height * 0.25
color: "red"
opacity: 0.5
PointHandler {
onGrabChanged: (transition, pointEvent) => {
console.log("Red received", pointEvent, transition)
}
}
}
Rectangle {
width: parent.width * 0.5
height: parent.height * 0.5
x: parent.width * 0.4
y: parent.height * 0.4
color: "yellow"
opacity: 0.5
ListView {
anchors.fill: parent
model: ["tes", "ting", "one", "two"]
delegate: Text {
text: modelData
}
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-apple-pencil.zip
Type: application/zip
Size: 6874 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20251020/59ed7e6f/attachment.zip>
More information about the Interest
mailing list