### Constructor

# Gio MenuItem new_from_model

since: 2.34

#### Declaration

    GMenuItem*
    g_menu_item_new_from_model (
      GMenuModel* model,
      gint item_index
    )

#### Description

Creates a `GMenuItem` as an exact copy of an existing menu item in a `GMenuModel`.

`item_index` must be valid (ie: be sure to call `g_menu_model_get_n_items()` first).

Available since: 2.34

#### Parameters

`model`

  Type: `GMenuModel`

  A `GMenuModel`.

  The data is owned by the caller of the function.

`item_index`

  Type: `gint`

  The index of an item in `model`.

#### Return value

Type: `GMenuItem`

A new `GMenuItem`.

The caller of the function takes ownership of the data, and is responsible for freeing it.