Is QtQuickComponents.MouseEventListener needed anymore?

Marco Martin notmart at gmail.com
Sat Dec 21 18:34:24 UTC 2013


On Saturday 21 December 2013, David Edmundson wrote:
> I was looking through MouseEventListener and trying to work out if
> it's needed any more. As far as I can tell, all functionality that it
> provides* is provided by Qt's MouseArea.
> 
> I assume it was added to work round a specific bug/missing feature in
> Qt's MouseArea, but it's not clear what that was.


I think i answered to this several times already, but probably i didn't 
document it, so my bad :p
Yes it's needed.

the two main use cases for it are still not adressed by MouseArea (and in some 
sense, they shouldn't)

the main use of MouseEventListener is to passively listen to the event of its 
children without stealing or altering those events.
that's why it's called MouseEvent*Listener*

as a second thing, it provides absolute coordinates in the declarative mouse 
event.

the one thing for which a mousearea can be used now is the mouse wheel events

Cheers,
Marco Martin


More information about the Plasma-devel mailing list