If you are looking for another example, you can take a look at the QxModelView module of QxOrm library [qxorm.com] : this is an implementation of the QAbstractItemModel Qt class and allows to display in QML views (and Qt Widgets too) all classes/properties registered into QxOrm context.
The source code is available in the QxOrm package.
There is a FAQ here : http://www.qxorm.com/qxorm_en/faq.html#faq_300
And there is a sample project in the ./test/qxBlogModelView/ directory of QxOrm package.
And with QxEntityEditor, you can also generate the source code for nested models to manage relationships between entities (1-n, n-1, n-n, 1-1).
↧