Skip to content

MenuItemInfo

Property Type Description
type string separator” – menu separator
command” – menu command item
container” – container for a submenu: with this item, either “items” or “itemsSource” property is required.
title string Menu item title.
Ignored when type = “separator”.
enabled bool Optional. Indicates whether menu item is enabled or disabled.
Default: true
API 1.30+
icon.url string Optional. Indicates which URL to load an item’s icon from.
invoke string Menu item action.
Valid only when type = “command”.
The value of this field corresponds to one of API method names described in this document.
Examples:
“showModalDialog”, “showCentralWidget”, “addDockingWidget”, “openPopupWindow”, etc.
invokeArgs array Arguments to the API method described by invoke as described by the API call documentation in this document.
Valid only when type = “command”.
items MenuItemInfo[] Applies when type = “container”
Array of MenuItemInfo objects describing a submenu.
itemsSource string Applies when type = “container”, appears instead of “items”.
Specifies an internal source of container items.
Possible values:
:dockingWidgets” – list of docking widgets with their state (visible/hidden)
API 1.38+