{ "name": "ObjectModel", "module": "Quickshell", "type": "class", "super": { "type": "unknown", "module": "", "name": "" }, "description": "View into a list of objets", "details": "Typed view into a list of objects.\n\nAn ObjectModel works as a QML [Data Model], allowing efficient interaction with\ncomponents that act on models. It has a single role named `modelData`, to match the\nbehavior of lists.\nThe same information contained in the list model is available as a normal list\nvia the `values` property.\n\n#### Differences from a list\nUnlike with a list, the following property binding will never be updated when `model[3]` changes.\n```qml\n// will not update reactively\nproperty var foo: model[3]\n```\n\nYou can work around this limitation using the TYPE99Vvalues99Tprop99TYPE property of the model to view it as a list.\n```qml\n// will update reactively\nproperty var foo: model.values[3]\n```\n\n[Data Model]: https://doc.qt.io/qt-6/qtquick-modelviewsdata-modelview.html#qml-data-models\n", "flags": [ "uncreatable" ], "properties": { "values": { "type": { "type": "qt", "module": "qml", "name": "list", "of": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } }, "details": "The content of the object model, as a QML list.\nThe values of this property will always be of the type of the model.\n", "flags": [ "readonly" ] } }, "functions": [ { "ret": { "type": "qt", "module": "qml", "name": "int" }, "name": "indexOf", "id": "indexOf", "details": null, "params": [ { "name": "object", "type": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } } ] } ], "signals": { "objectInsertedPost": { "name": "objectInsertedPost", "details": "Sent immediately after an object is inserted into the list.\n", "params": [ { "name": "object", "type": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } }, { "name": "index", "type": { "type": "qt", "module": "qml", "name": "int" } } ] }, "objectInsertedPre": { "name": "objectInsertedPre", "details": "Sent immediately before an object is inserted into the list.\n", "params": [ { "name": "object", "type": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } }, { "name": "index", "type": { "type": "qt", "module": "qml", "name": "int" } } ] }, "objectRemovedPost": { "name": "objectRemovedPost", "details": "Sent immediately after an object is removed from the list.\n", "params": [ { "name": "object", "type": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } }, { "name": "index", "type": { "type": "qt", "module": "qml", "name": "int" } } ] }, "objectRemovedPre": { "name": "objectRemovedPre", "details": "Sent immediately before an object is removed from the list.\n", "params": [ { "name": "object", "type": { "type": "qt", "module": "qml.QtQml", "name": "QtObject" } }, { "name": "index", "type": { "type": "qt", "module": "qml", "name": "int" } } ] } }, "variants": {} }