[Qt-qml] Overlapping MouseAreas / big cursor for recording video
Cornelius Hald
hald at icandy.de
Sun Aug 29 15:55:33 CEST 2010
Hi,
I just finished writing the question below when I found out a working
solution for me, so I thought I share it. Maybe someone has the same
problem...
I've got it working by changing the top-most MouseArea that I'm using
for the cursor to look like this:
MouseArea {
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.RightButton
onMousePositionChanged: {
cursor.x = mouse.x;
cursor.y = mouse.y;
}
}
Now this MouseArea is only listening to right-clicks and will pass
through the left-clicks to the underlying items.
Cheers,
Conny
---------------------------------------
Hi,
is it possible to have overlapping MouseAreas and make them both receive
mouse events?
My concrete problem is, that I wanted to record a short demo of my QML
application with a big semi-transparent touch-style cursor. Therefore
I've added a MouseArea to the main QML file that listens to position
changed events and moves the cursor image accordingly. But if I do it
like this, I can´t click anything anymore because all clicks are
intercepted by this MouseArea.
----------------------------------------
More information about the Qt-qml
mailing list