:right-sidebar: True ShortcutsGroup =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: ShortcutsGroup(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Box`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Orientable` :Constructors: :: ShortcutsGroup(**properties) Methods ------- .. rst-class:: interim-class .. class:: ShortcutsGroup :no-index: .. method:: add_shortcut(shortcut: ~gi.repository.Gtk.ShortcutsShortcut) -> None Adds a shortcut to the shortcuts group. This is the programmatic equivalent to using :obj:`~gi.repository.Gtk.Builder` and a ```` tag to add the child. Adding children with other API is not appropriate as ``GtkShortcutsGroup`` manages its children internally. .. versionadded:: 4.14 :param shortcut: the ``GtkShortcutsShortcut`` to add Properties ---------- .. rst-class:: interim-class .. class:: ShortcutsGroup :no-index: .. attribute:: props.accel_size_group :type: ~gi.repository.Gtk.SizeGroup The size group for the accelerator portion of shortcuts in this group. This is used internally by GTK, and must not be modified by applications. .. attribute:: props.height :type: int A rough measure for the number of lines in this group. This is used internally by GTK, and is not useful for applications. .. attribute:: props.title :type: str The title for this group of shortcuts. .. attribute:: props.title_size_group :type: ~gi.repository.Gtk.SizeGroup The size group for the textual portion of shortcuts in this group. This is used internally by GTK, and must not be modified by applications. .. attribute:: props.view :type: str An optional view that the shortcuts in this group are relevant for. The group will be hidden if the :obj:`~gi.repository.Gtk.ShortcutsWindow.props.view_name` property does not match the view of this group. Set this to :const:`None` to make the group always visible.