MenuBarItem QML Type

Presents a drop-down menu within a MenuBar . 更多...

import 语句: import QtQuick.Controls 2.15
Since: Qt 5.10
继承:

AbstractButton

特性

信号

详细描述

MenuBarItem presents a Menu within a MenuBar . The respective drop-down menu is shown when a MenuBarItem is triggered via keyboard, mouse, or touch.

MenuBarItem is used as a default delegate type for MenuBar . Notice that it is not necessary to declare MenuBarItem instances by hand when using MenuBar . It is sufficient to declare Menu instances as children of the MenuBar and the respective items are created automatically.

另请参阅 Customizing MenuBar , MenuBar ,和 菜单控件 .

特性文档编制

highlighted : bool

This property holds whether the menu bar item is highlighted by the user.

A menu bar item can be highlighted by mouse hover or keyboard navigation.

默认值为 false .

This property holds the menu that this item presents in a menu bar, or null if this item does not have a menu.

This property holds the menu bar that contains this item, or null if the item is not in a menu bar.

信号文档编制

void triggered ()

This signal is emitted when the menu bar item is triggered by the user.

注意: 相应处理程序是 onTriggered .