summaryrefslogtreecommitdiff
path: root/src/controls/MenuBar.qml
diff options
context:
space:
mode:
authorFilippo Cucchetto <filippocucchetto@gmail.com>2015-08-17 17:10:35 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-29 11:10:32 +0000
commit4998538c94ed8cb029b8849a60b3f7528eae8311 (patch)
treebba17e65f3142e4645ab0f79c26ab108c26130bb /src/controls/MenuBar.qml
parenta33fe70970d891e096fff6a84d7e0c02f8ee978a (diff)
downloadqtquickcontrols-4998538c94ed8cb029b8849a60b3f7528eae8311.tar.gz
Fixed key event propagation with submenus
When a menu receive a Key_Right event and its subMenu popupwindow is already visible, the event should be discarded. In this way the event can forwarded up to the menubar for moving to the next root menu. Change-Id: Ifeb402f66fdac9fcf3a541456b929d11d36ad00d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/MenuBar.qml')
-rw-r--r--src/controls/MenuBar.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml
index 444185cc..8d49a1ed 100644
--- a/src/controls/MenuBar.qml
+++ b/src/controls/MenuBar.qml
@@ -246,6 +246,8 @@ MenuBarPrivate {
}
}
+ Keys.forwardTo: d.openedMenuIndex !== -1 ? [root.menus[d.openedMenuIndex].__contentItem] : []
+
Row {
id: row
x: d.style ? d.style.padding.left : 0