aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-01-14 09:41:23 +0100
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-01-20 13:49:28 +0100
commit606ce564d82dd099fb1fca939692839cf571b1ac (patch)
tree45eb2b5ee6f7bb44617268156af2325d21a281ca /src/quick/items/qquickwindow.cpp
parent8a23c8a613b5eb360a48ee6c64ea3507caf878e2 (diff)
Send hover events also to QQuickItem::childMouseEventFilter
childMouseEventFilter already gets touch events, and it is logical to send the hover events which are essentially mouse events. By also sending hover events to the filter it allows an item to track the mouse. Existing implementations of childMouseEventFilter should not be effected by more events being sent to it as checking for the event type should be practiced in all overloads. Change-Id: Ie00aceef05e41e4e8f6d80007343c5a5b9f566cf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 2c8b24baf6..f58bd489fe 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1596,6 +1596,11 @@ bool QQuickWindowPrivate::sendHoverEvent(QEvent::Type type, QQuickItem *item,
QHoverEvent hoverEvent(type, transform.map(scenePos), transform.map(lastScenePos), modifiers);
hoverEvent.setAccepted(accepted);
+ QSet<QQuickItem *> hasFiltered;
+ if (sendFilteredMouseEvent(item->parentItem(), item, &hoverEvent, &hasFiltered)) {
+ return true;
+ }
+
q->sendEvent(item, &hoverEvent);
return hoverEvent.isAccepted();