02-25-2013 01:29 AM
I asked a different question previously, here: http://supportforums.blackberry.com/t5/Cascades-De
However, it strikes me that the fundamental problem is whether you can edit a data model at all, in QML.
Looking at the ListView docs (believe me, I've read them over numerous times) it looks like it can't be done using ListItemComponent for the visual model.
Can anyone confirm this is impossible? Am I completely unable to store any sort of state with an item if my list is in QML and displayed via ListItemComponent? Can I add a new element to the datamodel somehow, perhaps? I just need to store a state in some way.
02-25-2013 02:43 AM
I suspect the answer to my question is no.
I solved my problem by passing in the class that controlled the lists data model as a context property. Using that class I called a function from the QML list item that was defined as a Q_INVOKABLE function in the class. This function modifies the data model appropriately. I have found no way to modify the data model dirrectly from QML.
02-25-2013 03:21 AM
It's possible. I responded to your original question, please try if it works: