MenuItem.newSubmenu

gio.menu_item.MenuItem newSubmenu(string label, gio.menu_model.MenuModel submenu)

Creates a new #GMenuItem representing a submenu.

This is a convenience API around [gio.menu_item.MenuItem.new_] and [gio.menu_item.MenuItem.setSubmenu].

Parameters

labelthe section label, or null
submenua #GMenuModel with the items of the submenu

Returns

a new #GMenuItem