Repeater Contextproperty Model not usable if Contextproperty index is used
Solved
QML and Qt Quick
-
Hi,
This works fine
Repeater { id: rep model: deviceModel // <- QAbstractListModel delegate: BaseDevice { dev: model // <- WORKS } }
This doesnt, since model is not recognized anymore and can not be accessed during runtime
Repeater { id: rep model: deviceModel // <- QAbstractListModel delegate: BaseDevice { required property int index // <- BC OF THIS dev: model // <- DOESNT WORK ANYMORE } }
I know the functionality is exclusive, so either use index or model. Both achieve everything you need.
But why does it behave like that? -