MenuButton.setMenuModel

Sets the #GMenuModel from which the popup will be constructed, or null to dissociate any existing menu model and disable the button.

Depending on the value of #GtkMenuButton:use-popover, either a #GtkMenu will be created with gtk.menu.Menu.newFromModel, or a #GtkPopover with gtk.popover.Popover.newFromModel. In either case, actions will be connected as documented for these functions.

If #GtkMenuButton:popup or #GtkMenuButton:popover are already set, those widgets are dissociated from the menu_button, and those properties are set to null.

class MenuButton
void
setMenuModel

Parameters

menuModel gio.menu_model.MenuModel

a #GMenuModel, or null to unset and disable the button