ObjectModel: unknown [uncreatable]
import Quickshell
View into a list of objets More
Properties
Functions
Signals
- objectInsertedPost(object: QtObject, index: int)
- objectInsertedPre(object: QtObject, index: int)
- objectRemovedPost(object: QtObject, index: int)
- objectRemovedPre(object: QtObject, index: int)
Detailed Description
Typed view into a list of objects.
An ObjectModel works as a QML Data Model, allowing efficient interaction with
components that act on models. It has a single role named modelData
, to match the
behavior of lists.
The same information contained in the list model is available as a normal list
via the values
property.
Differences from a list
Unlike with a list, the following property binding will never be updated when model[3]
changes.
// will not update reactively
property var foo: model[3]
You can work around this limitation using the values property of the model to view it as a list.
// will update reactively
property var foo: model.values[3]
Property Details
The content of the object model, as a QML list. The values of this property will always be of the type of the model.
Function Details
No details provided.
Signal Details
Sent immediately after an object is inserted into the list.
Sent immediately before an object is inserted into the list.
Sent immediately after an object is removed from the list.
Sent immediately before an object is removed from the list.