NoSelection

class NoSelection(**properties: Any)

Superclasses: Object

Implemented Interfaces: ListModel, SectionModel, 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

class NoSelection
classmethod new(model: ListModel | None = None) NoSelection

Creates a new selection to handle model.

Parameters:

model – the GListModel to manage

Methods

class NoSelection
get_model() ListModel | None

Gets the model that self is wrapping.

set_model(model: ListModel | None = None) None

Sets the model that self should wrap.

If model is None, this model will be empty.

Parameters:

model – A GListModel to wrap

Properties

class NoSelection
props.item_type: type

The type of items. See get_item_type.

Added in version 4.8.

props.model: ListModel

The model being managed.

props.n_items: int

The number of items. See get_n_items.

Added in version 4.8.