Menu.newFromModel

Creates a #GtkMenu and populates it with menu items and submenus according to model.

The created menu items are connected to actions found in the #GtkApplicationWindow to which the menu belongs - typically by means of being attached to a widget (see gtk.menu.Menu.attachToWidget) that is contained within the #GtkApplicationWindows widget hierarchy.

Actions can also be added using gtk.widget.Widget.insertActionGroup on the menu's attach widget or on any of its parent widgets.

class Menu
static
newFromModel

Parameters

model gio.menu_model.MenuModel

a #GMenuModel

Return Value

Type: gtk.menu.Menu

a new #GtkMenu