diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickoverlay.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp index 58ec5582..10ac3623 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -201,10 +201,15 @@ void QQuickOverlayPrivate::handlePress(QEvent *event) } if (!mouseGrabberPopup) { - // allow non-modal popups to close themselves + // allow non-modal popups to close themselves, + // and non-dimming modal popups to block the event const auto popups = stackingOrderPopups(); - for (QQuickPopup *popup : popups) - popup->overlayEvent(q, event); + for (QQuickPopup *popup : popups) { + if (popup->overlayEvent(q, event)) { + setMouseGrabberPopup(popup); + return; + } + } } event->ignore(); |