aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates/qquickpopup.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-12-15 16:14:22 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-12-15 16:14:22 +0200
commitb58ec3b086518da5aa573f99426235854c23e35f (patch)
tree861a9935d8f1cdba2fdca546836a351736dbddbf /src/quicktemplates/qquickpopup.cpp
parent4826f86e274f1b29bd769e6790824f9e62a40f62 (diff)
parent22032227d16c39211e2ebceef97d21f4d89c7c87 (diff)
Merge tag 'v6.5.8-lts-lgpl' into 6.56.5
Qt 6.5.8-lts-lgpl release
Diffstat (limited to 'src/quicktemplates/qquickpopup.cpp')
-rw-r--r--src/quicktemplates/qquickpopup.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/quicktemplates/qquickpopup.cpp b/src/quicktemplates/qquickpopup.cpp
index e48f944936..bc573a3313 100644
--- a/src/quicktemplates/qquickpopup.cpp
+++ b/src/quicktemplates/qquickpopup.cpp
@@ -467,7 +467,8 @@ bool QQuickPopupPrivate::blockInput(QQuickItem *item, const QPointF &point) cons
// don't block presses and releases
// a) outside a non-modal popup,
// b) to popup children/content, or
- // b) outside a modal popups's background dimming
+ // c) outside a modal popups's background dimming
+
return modal && ((popupItem != item) && !popupItem->isAncestorOf(item)) && (!dimmer || dimmer->contains(dimmer->mapFromScene(point)));
}
@@ -2797,6 +2798,18 @@ void QQuickPopup::mouseUngrabEvent()
d->handleUngrab();
}
+/*!
+ \internal
+
+ Called whenever the window receives a Wheel/Hover/Mouse/Touch event,
+ and has an active popup (with popupType: Popup.Item) in its scene.
+
+ The purpose is to close popups when the press/release event happened outside of it,
+ and the closePolicy allows for it to happen.
+
+ If the function is called from childMouseEventFilter, then the return value of this
+ function will determine whether the event will be filtered, or delivered to \a item.
+*/
bool QQuickPopup::overlayEvent(QQuickItem *item, QEvent *event)
{
Q_D(QQuickPopup);