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 .

另請參閱 items .

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 .

items : 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 .