Hello,

 

I believe that what you require is to set the accepted member of the
mose event that comes in with the various mouse handlers to true. see
http://doc.qt.nokia.com/4.7/qml-mouseevent.html

 

Mark T

 

From: qt-qml-boun...@trolltech.com [mailto:qt-qml-boun...@trolltech.com]
On Behalf Of claudiu.che...@nokia.com
Sent: 02 December 2010 08:39
To: qt-qml@trolltech.com
Subject: [Qt-qml] Mouse event propagation on stack

 

Hello,

 

I have 2 components (2 basic rectangles) which overlap

The one on the bottom of the stack contains a mouseArea with hover
enabled.

The mouse events seem to propagate to all the elements in the stack, not
limiting itself to only the top element in the stack(similar to HTML
elements).

 

Is there something similar to javascript's stopPropagation command? 

 

I've managed to implement this behavior by adding a dummy mouse area in
the top element which has empty handlers for all the events.

But I don't like the idea of having to manage all the possible cases for
mouse interactions.

 

Thanks,

Claudiu

 

_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to