[Interest] setMouseTracking() equivalent for QQuickItem?

Agocs Laszlo Laszlo.Agocs at digia.com
Sat Jul 26 21:00:06 CEST 2014


Hello,

Try enabling hover events (QQuickItem::setAcceptHoverEvents), they are disabled by default. Then handle them in hoverEnter/Leave/MoveEvent().

Best regard,
Laszlo

________________________________
From: interest-bounces+laszlo.agocs=digia.com at qt-project.org [interest-bounces+laszlo.agocs=digia.com at qt-project.org] on behalf of Thomas Sevaldrud [thomas at silentwings.no]
Sent: Saturday, July 26, 2014 5:02 PM
To: Interest at qt-project.org
Subject: [Interest] setMouseTracking() equivalent for QQuickItem?

Hi, I have a Qt Quick application with a QQuickItem derived class that does some GL rendering. In this QuickItem i have overridden mouseMoveEvent(). As with QWidgets, this event only fires when the mouse button is pressed, but unlike QWidget there is no setMouseTracking method to enable mouse move events without pressing the button.

What is the correct way of doing this in Qt Quick? I.e how do I get mouse move events in my custom QuickItem without pressing the mouse button?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140726/359d3103/attachment.html>


More information about the Interest mailing list