Thank you! after proper reading I can see now how nasty is to try saving things in a delegate. So now what I’m doing is to simply access the model directly in this way:
onClicked: {
var model = logModel.get(styleData.row)
console.log("idLog",model.idLog) //prints correct id
}
But now my question is this: can I expect to have always a correlation between the row and the original object index? I tried removing elements and it seems that the model keeps track correctly but, should I be aware of a better way of doing this? gotchas?
↧