diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-07-06 13:15:25 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-07-07 22:35:42 +0200 |
commit | 48da34f3d797f58b3eda9ed0a98aa1776d75d946 (patch) | |
tree | 01200e18fd4c35e39e4a1ae21f06a69a7f2ebff1 /src/quicktemplates2/qquickoverlay_p_p.h | |
parent | 6363bc8bfebdedad9f4b871f99c23c9b7b0e8bc7 (diff) |
QQuickOverlay: Handle hover events
With recent changes to hover handling logic, hover events would have
been sent to the "main window", even if a popup were modal. As this is
unwanted (a modally blocked button should not auto-raise when hovered),
we now prevent delivery of those events in QQuickOverlay and
overlayEvent.
The logic is the same as for mouse and touch events: If we get a
matching event, we ask the popup to handle it. The popup then uses the
existing blockInput logic to decide whether the event should be blocked
or forwarded.
Pick-to: 6.2
Change-Id: I2194fd8e832592efd5b7b9697412bdaeaea74b83
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickoverlay_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickoverlay_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickoverlay_p_p.h b/src/quicktemplates2/qquickoverlay_p_p.h index ef3d9ee2..fbb2f86c 100644 --- a/src/quicktemplates2/qquickoverlay_p_p.h +++ b/src/quicktemplates2/qquickoverlay_p_p.h @@ -74,6 +74,7 @@ public: bool handleRelease(QQuickItem *source, QEvent *event, QQuickPopup *target); bool handleMouseEvent(QQuickItem *source, QMouseEvent *event, QQuickPopup *target = nullptr); + bool handleHoverEvent(QQuickItem *source, QHoverEvent *event, QQuickPopup *target = nullptr); #if QT_CONFIG(quicktemplates2_multitouch) bool handleTouchEvent(QQuickItem *source, QTouchEvent *event, QQuickPopup *target = nullptr); #endif |