View¶
View is a menu visual container. It reacts to keyboard navigation when appropriate. It suffice to give keyboard focus to make it appear.
Item { FocusShower { id: main anchors.fill: parent Keys.onMenuPressed: menu.focus = true } View { id: menu returnFocusTo: main root: menu0 Menu { id: menu0 title: "Menu0" // ... } } }
Item that should regain keyboard focus when menu is dismissed by user.
A
Menu
to use as root of the menu hierarchy.
- Parameters
menu (
Menu
) – Push another menu in the view.
Go back to parent menu.