
See the propagateComposedEvents documentation for details.īy default, MouseArea items only report mouse clicks and not changes to the position of the mouse cursor. If a MouseArea overlaps with the area of other MouseArea items, you can choose to propagate clicked, doubleClicked and pressAndHold events to these other items by setting propagateComposedEvents to true and rejecting events that should be propagated.

It's also possible to handle mouse wheel events via the onWheel signal. The most commonly used involved handling mouse presses and clicks: onClicked, onDoubleClicked, onPressed, onReleased and onPressAndHold. Information about the mouse position and button clicks are provided via signals for which event handler properties are defined. The containsMouse read-only property indicates the presence of the mouse cursor over the mouse area but, by default, only when a mouse button is held down see the containsMouse documentation for details. This property is often used in bindings between properties in a user interface. The pressed read-only property indicates whether or not the user is holding down a mouse button over the mouse area. When set to false, the mouse area becomes transparent to mouse events. MouseArea is an invisible Item, but it has a visible property. When disabled, the mouse area becomes transparent to mouse events.

The enabled property is used to enable and disable mouse handling for the proxied item.

By effectively acting as a proxy, the logic for mouse handling can be contained within a MouseArea item.
