ListModel[T]
from slint import ListModelListModel is a Model that stores its data in a Python list.
Construct a ListMode from an iterable (such as a list itself).
Use push_row, or its append alias, to add items to the
model, and use the del statement to remove items.
Any changes to the model are automatically reflected in the views in UI they’re used with.
Bases: Model[T]
Properties
Section titled “Properties”list: list[T]Methods
Section titled “Methods”row_count
Section titled “row_count”row_count() -> introw_data
Section titled “row_data”row_data(row: int) -> T | Noneset_row_data
Section titled “set_row_data”remove_row
Section titled “remove_row”insert_row
Section titled “insert_row”push_row
Section titled “push_row”push_row(value: T) -> NoneAppends the value to the end of the list.
append
Section titled “append”append(value: T) -> NoneAppends the value to the end of the list, like push_row.
insert
Section titled “insert”Inserts the value at the given index. Negative indices and indices
past the end of the list behave like list.insert.
notify_row_changed
Section titled “notify_row_changed”Call this method from a sub-class to notify the views that a row has changed.
notify_row_removed
Section titled “notify_row_removed”Call this method from a sub-class to notify the views that
count rows have been removed starting at row.
notify_row_added
Section titled “notify_row_added”Call this method from a sub-class to notify the views that
count rows have been added starting at row.
© 2026 SixtyFPS GmbH