[Qt-qml] [Qt-interest] qml and real c++ application : QabstractItemModel ?
Yuvraaj Kelkar
yuvraaj at gmail.com
Mon Dec 27 21:28:22 CET 2010
> Hi,
>
> I am trying to create a new application that use qml for interface (to
> visualize and edit datas). I understand how to use qml with some simple
> model (list, ...) : but in the real life, is it better to use one complex
> QAbstractItemModel that acces all the data of my application (with complex
> tree ...) or to have a lot of qabstractitemmodel simpler (list, ...), or to
> not use at all qabstractItemModel ? is there any feedback from people that
> use now QML in the true life (not a simple contact list ,...) ?
My code is a contact list in which each contact has a list of phone numbers.
I started off with a tree view style approach by embedding a ListView
(numbers) inside the outer ListView's delegate Item.
This worked, but it was not pretty.
I settled with two separate list views. When the user clicks on a
contact, the contact ListView modifies the model of the ContactDetails
ListView.
Then with some opacity magic, the ContactDetails view is shown and the
main contact list is hidden.
Code is here: http://code.google.com/p/qgvdial/source/browse/#svn%2Ftrunk%2Fqml
More information about the Qt-qml
mailing list