Thanks, Bo Your UI obviously mixes concepts in the same area, which is why you have a problem with the low-end model code. Indeed it is so. To be precise, there are two conceptually different, yet related models. 1. One is to have a contact list coming from the messenger API. OK, I add a couple of custom properties, yet it is still pretty much an external contact list and it would be good to keep it this way - easier to verify, easier to sync (I don't trust messenger API much, so it's good to have isolated point of contact). 2. Another one is the model for list shown in the UI. That can have an extra item (my own contacts) or maybe even hide some item (voice test contact always provided by a messenger). These two models are indeed conceptually different yet one can be transformed into another one using a couple of clear and simple rules. *Options* So what I am asking for is an advice (or maybe somebody even has similar experience) on how to do such a transformation. One possibility is to to make 2nd model in a pure QML (manipulate ListModel whenever c++ model changes). Another one is to have 2nd model in C++. Another option is to have just one model on a C++ side, inject and remove items there and/or maybe have special attribute to tell whether a particular item is hidden. Cheers, Artem.
|
_______________________________________________ Qt-qml mailing list Qt-qml@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-qml