Data Models in QML
Model-View-Controller has been a very useful design pattern that has found application in a large number of computer programs, helping to improve the architecture and code quality. A lot of application development frameworks provide the ability to reuse models and views, creating a more solid and flexible application structure.
Qt is one of the frameworks that provides a model-view-controller architecture with a large number of classes that include both an predefined set of widgets and appropriate models for them, as well as a number of abstract classes that allow developing fully customized models, views and delegates with a Qt Model-View-Controller compatible API. Users can choose between using a series of views that represent list, table and tree data structures out of the box and extend them if needed, or create from scratch a completely custom implementation that satisfies their needs.
But what about Qt Quick? Can we take advantage of the Model-View-Controller design pattern in QML applications, as well as reuse our currently implemented Qt Model-View-Controller custom models that have been implemented in C++/Qt ? The answer is yes, and in this talk you will learn how to do that.
This talk will highlight a completely new Model-View-Controller API that is introduced in QML and will show you how to operate with model, view, and controller in a declarative way rather than in an object-oriented way. We will cover all the model classes that come with QtQuick “out of the box” including four powerful models: ListModel, XmlListModel, VisualItemModel and VisualDataModel. We will review the differences and advantages of each of the models so you can choose one that best suits your needs. Special attention will be paid to custom models that can be implemented in C++/Qt and exported to the QML environment to provide users with the full capability of data sources they want to operate on. We will support the presentation with a lot of examples where you can actually see how the code works. The presentation will also cover the views and delegates that can be used in QML applications.
Sessions Details
- Qt Quick for App Development24 May 14:30 - 15:10
Session Presenters
The conference organizing committee has put together slide templates for presenters to use if they so choose. Feel free to take and modify as you like!

