:right-sidebar: True NoSelection =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: NoSelection(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ListModel`, :class:`~gi.repository.Gtk.SectionModel`, :class:`~gi.repository.Gtk.SelectionModel` ``GtkNoSelection`` is a ``GtkSelectionModel`` that does not allow selecting anything. This model is meant to be used as a simple wrapper around a ``GListModel`` when a ``GtkSelectionModel`` is required. ``GtkNoSelection`` passes through sections from the underlying model. Constructors ------------ .. rst-class:: interim-class .. class:: NoSelection :no-index: .. classmethod:: new(model: ~gi.repository.Gio.ListModel | None = None) -> ~gi.repository.Gtk.NoSelection Creates a new selection to handle ``model``. :param model: the ``GListModel`` to manage Methods ------- .. rst-class:: interim-class .. class:: NoSelection :no-index: .. method:: get_model() -> ~gi.repository.Gio.ListModel | None Gets the model that ``self`` is wrapping. .. method:: set_model(model: ~gi.repository.Gio.ListModel | None = None) -> None Sets the model that ``self`` should wrap. If ``model`` is :const:`None`, this model will be empty. :param model: A ``GListModel`` to wrap Properties ---------- .. rst-class:: interim-class .. class:: NoSelection :no-index: .. attribute:: props.item_type :type: type The type of items. See :obj:`~gi.repository.Gio.ListModel.get_item_type`. .. versionadded:: 4.8 .. attribute:: props.model :type: ~gi.repository.Gio.ListModel The model being managed. .. attribute:: props.n_items :type: int The number of items. See :obj:`~gi.repository.Gio.ListModel.get_n_items`. .. versionadded:: 4.8