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
            }
        }
    }
}

<<attachment: test-apple-pencil.zip>>

_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to