The model will use a sorter to determine the order in which
its items should appear by calling gtk.sorter.Sorter.compare
for pairs of items.
Sorters may change their sorting behavior through their lifetime.
In that case, they will emit the gtk.sorter.Sorter.changed signal
to notify that the sort order is no longer valid and should be updated
by calling gtk.sorter.Sorter.compare again.
gtk.sorter.Sorter is an object to describe sorting criteria.
Its primary user is gtk.sort_list_model.SortListModel
The model will use a sorter to determine the order in which its items should appear by calling gtk.sorter.Sorter.compare for pairs of items.
Sorters may change their sorting behavior through their lifetime. In that case, they will emit the gtk.sorter.Sorter.changed signal to notify that the sort order is no longer valid and should be updated by calling gtk.sorter.Sorter.compare again.
GTK provides various pre-made sorter implementations for common sorting operations. gtk.column_view.ColumnView has built-in support for sorting lists via the gtk.column_view_column.ColumnViewColumn.Sorter property, where the user can change the sorting by clicking on list headers.
Of course, in particular for large lists, it is also possible to subclass gtk.sorter.Sorter and provide one's own sorter.