Thanks for all the help, guys. I was able to get this working like so:
GridView {
required property Space space
property var spaceFeatureList: sceneModel.featureUuidList(false, space.uuid)
ListModel {
id: spaceFeatureListModel
}
Component.onCompleted: {
spaceFeatureListModel.clear()
for (var i = 0; i < spaceFeatureList.length; i++) {
spaceFeatureListModel.append({ "uuid": spaceFeatureList[i] })
}
}
model: spaceFeatureListModel
Connections {
target: sceneSetupPane
function onFeatureListChanged(spaceId, activityId, status) {
if (spaceId.localeCompare(space.uuid) === 0) {
if (status) {
var i
for (i = 0; i < spaceFeatureListModel.count; i++) {
if (spaceFeatureListModel.get(i).uuid === activityId) {
break
}
}
if (i >= spaceFeatureListModel.count) {
spaceFeatureListModel.append({ "uuid": activityId })
}
} else {
for (i = 0; i < spaceFeatureListModel.count; i++) {
if (spaceFeatureListModel.get(i).uuid === activityId) {
spaceFeatureListModel.remove(i)
break
}
}
}
}
}
}
The function could probably use some optimizing, but it works. Thanks again.