Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Setting property based on role

$
0
0
I might be missing something but I can’t find out to set the property based on the role coming in from TableView. If I was using a ListModel then I would have ListModel { id: mymodel ...} ... onAccepted: { myModel.setProperty(rowIndex, role, value)  } Except I’m using a QObjectList so instead I would expect onAccepted: { myModel[rowIndex].setProperty(role, value) } to work but setProperty doesn’t exist. So how do I set the property dynamically like this?

Viewing all articles
Browse latest Browse all 4972

Trending Articles