Obsolete Members for Menu

The following members of QML type Menu 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

特性

特性文档编制

[default] data : list < 对象 >

This default property holds the list of all objects declared as children of the menu. The data property includes objects that are not MenuItem 实例,譬如 Timer and QtObject .

另请参阅 .

enabled : bool

This property holds whether the menu is enabled. The default value is true .

font : font

This property holds the menu's font.

另请参阅 text .

: list < MenuItem >

This property holds the list of items in the menu.

This property holds the menubar that the menu belongs to, or null if the menu is not in a menubar.

This property holds the item that presents the menu (in a parent menu).

minimumWidth : int

This property holds the minimum width of the menu. The default value is -1 (no minimum width).

[read-only] parentMenu : Menu

This property holds the parent menu that the menu belongs to, or null if the menu is not a sub-menu.

[read-only] systemTrayIcon : SystemTrayIcon

This property holds the system tray icon that the menu belongs to, or null if the menu is not in a system tray icon.

title : string

This property holds the menu's title.

type : enumeration

This property holds the type of the menu.

Available values:

常量 描述
Menu.DefaultMenu A normal menu (default).
Menu.EditMenu An edit menu with pre-populated cut, copy and paste items.

visible : bool

This property holds whether the menu is visible. The default value is true .