Don't allow focus on invisible menu items

This commit is contained in:
Cameron Gutman 2019-02-09 19:21:43 -08:00
parent 1fd099db70
commit 48e78d2cd3

View file

@ -5,6 +5,7 @@ MenuItem {
// Ensure focus can't be given to an invisible item
enabled: visible
height: visible ? implicitHeight : 0
focusPolicy: visible ? Qt.TabFocus : Qt.NoFocus
Keys.onReturnPressed: {
triggered()