[Qt-qml] PROBLEM : "state" of object inside ListView does not update correctly
Francesco Nwokeka
francesco.nwokeka at gmail.com
Sun Jan 30 13:59:57 CET 2011
Hi guys,
I have a little problem. I can't seem to update the state of my custom button that is inside my
delegate. Here is the structure:
// TagColumn
ListView{
ListModel{ id: tagColumnModel }
model: tagColumnModel
delegate: TagColumnDelegate{}
...
...
}
// TagColumnDelegate
Component {
TagButton{
text: tagName
state: tagState
...
...
}
}
when I need to add a tag, I do it with a function that does:
"tagColumnModel.append( { "tagName": newTag, "tagState": "newState" } );
and when i want to modify the state of an object inside my ListModel, i do:
"tagColumnModel.get( pos ).tagState = "newState"; "
but QML doesn't update the button's state with the new one given. Even though when i go read the new
state from the model everything is updated.
Do you have any hints on how to do this?
Thanks for your time,
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110130/cfad838f/attachment.html
More information about the Qt-qml
mailing list