GLib.OptionContext.set_main_group

### Method

# GLib OptionContextset_main_group

since: 2.6

#### Declaration [src]

    void
    g_option_context_set_main_group (
      GOptionContext* context,
      GOptionGroup* group
    )

#### Description [src]

Sets a `GOptionGroup` as main group of the `context`. This has the same effect as calling g_option_context_add_group(), the only difference is that the options in the main group are treated differently when generating `--help` output.

Available since: 2.6

#### Parameters

`group`

  Type: `GOptionGroup`

  The group to set as main group.

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