:right-sidebar: True OptionGroup =================================================================== .. currentmodule:: gi.repository.GLib .. class:: OptionGroup(*args, **kwargs) :no-contents-entry: A ``GOptionGroup`` struct defines the options in a single group. The struct has only private fields and should not be directly accessed. All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a ``GOptionGroup`` holding their options, which the application can then add to its :obj:`~gi.repository.GLib.OptionContext`\. Methods ------- .. rst-class:: interim-class .. class:: OptionGroup :no-index: .. method:: add_entries(entries: list[~gi.repository.GLib.OptionEntry]) -> None Adds the options specified in ``entries`` to ``group``\. .. versionadded:: 2.6 :param entries: a :const:`None`-terminated array of :obj:`~gi.repository.GLib.OptionEntry` .. method:: set_translation_domain(domain: str) -> None A convenience function to use gettext() for translating user-visible strings. .. versionadded:: 2.6 :param domain: the domain to use