summaryrefslogtreecommitdiff
path: root/src/controls/qquickmenupopupwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/qquickmenupopupwindow.cpp')
-rw-r--r--src/controls/qquickmenupopupwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index 8d821d84..670ad6aa 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -148,6 +148,13 @@ void QQuickMenuPopupWindow::updatePosition()
setGeometry(newPos.x(), newPos.y(), width(), height());
}
+void QQuickMenuPopupWindow::focusInEvent(QFocusEvent *e)
+{
+ QQuickWindow::focusInEvent(e);
+ if (m_menu && m_menu->menuContentItem())
+ m_menu->menuContentItem()->forceActiveFocus();
+}
+
void QQuickMenuPopupWindow::exposeEvent(QExposeEvent *e)
{
// the popup will reposition at the last moment, so its