Status Weekly Roundup: Desktop UI team
QML components consuming models (like ListView or Repeater) are very flexible about what that model is. It can be the most powerful C custom model inheriting from QAbstractItemModel, QML's handy ListModel, ObjectModel, or a plain JavaScript list.
However, this is not the end of the possibilities. For example, a list of QtObjects (or components that inherit from QtObject, like Item) can also be used as a model. This creates an interesting possibility of treating properties defined in objects as model roles.
Let's take a look at the example presented in
doc.qt.io/qt-5/qml-qtquick-c…
Using this approach, we can conveniently embed labels into objects in the StackLayout as read-only properties and use Repeater inside TabBar, as a model providing children of the StackLayout:
Thanks to that we don't have to maintain the correct order in two places (first for labels and later for corresponding objects in the layout).
#EthStatusProgress