[Interest] Track global mouse position in QML
renehh at gmail.com
Thu Mar 21 12:50:02 CET 2019
I want to track mouse movement within my entire application window, because
I need to show/hide/move items around where my cursor is at certain times.
(Think e.g. custom cursor)
I can do it easily by filling the entire window with a *MouseArea* and
handle *onPositionChanged*. The problem is that any mouse sensitive inputs
underneath, then get's blocked by the overlaying *MouseArea*. E.g. a
*TextField* that is usually highlighted on hover and clickable, no longer
receives any mouse events.
Is there any straightforward solution to this?
I know *QQuickWindow* has a *mouseMoveEvent*, but that doesn't seem to be
exposed in QML and if I can avoid subclassing and exposing a custom class,
I'd rather do that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest