QML - MouseArea - propagating onPositionChanged

qml, qt, qt-quick, qtquick2

Solution

Depending on your structure you can always manually propagate the event by having your onPositionChanged handler call underlyingMouseArea.positionChanged(mouse) This should manually emit the signal in the underlying MouseArea. My only concern is that you might not be able to pass a MouseEvent object this way(never tried with anything other than a string). However, you can always perform this manual emit in C++ which definetly would not suffer from any type conversion issues.

Problem

Is it possible to propagate a `MouseArea`'s positionChanged event to an underlying one? I've tried to set the `mouse.accepted` to `false` for any existing signal handler of the top-most `MouseArea` as well as setting the `propagateComposedEvents` to `true`. Neither of those worked (although I'm not surprised with the `propagateComposedEvents` not working since the documentation says it only relays events like `clicked`, `doubleClicked` and `pressAndHold`).

Original source