[Qt-qml] QML model handling

michael.brasser at nokia.com michael.brasser at nokia.com
Wed Oct 13 08:08:31 CEST 2010


Hi all,

One of the things we're researching now that 4.7 is out the door is how we work with data sets in QML. Part of that is researching "next generation" model classes for QML (internally, XmlListModel and and ListModel are already using a modified version of the list model from http://qt.gitorious.org/qt-labs/itemviews-ng, rather than QAbstractListModel).

Here are some of the things we are planning to look at (not meant to be exhaustive, but rather to describe the general direction of research):

* Allowing models to be aware of the data being viewed so they need only monitor that data for changes
    * Allowing views to cancel an incomplete request if the data isn't needed any more (e.g. quickly flicked list with threaded retrieval from a slow source)
    * Possibly allowing other hints as well, such as direction of movement
* Allowing optimal retrieval of data from storage and optimal exposure to QML
    * Allowing threaded retrieval of data
    * Allowing the "roles" exposed by a model to have type information (rather than wrapping everything in QVariant)
    * Allowing some data to be provided immediately, while other data is provided as it becomes available.
* Allowing rows in a list model to provide different sets of data or have a type (allowing a view to select a different delegate based on the data)
* Allowing easy creation of custom models, and providing a good set of convenience models
* Researching hierarchical models
* Researching model sorting, filtering, proxying, etc

In addition to the above, we'd love to get feedback on your experiences (both good and bad) with QML's current model handling, as well as any ideas you might have, additional features you'd like to see, etc.

Thanks,
Michael



More information about the Qt-qml mailing list