Custom model of nested lists to QML
Unsolved
General and Desktop
-
Hello,
What's the best approach to creating a role that exposes a list in QML?
There is a list of players and their bug reports. This is how the data is structured:
- NameRole,
- AgeRole,
- CreatedDatetimeRole,
- ChangedDatetimeRole,
- ReportsRole: [
- ReportNameRole,
- ReportDescriptionRole,
- ReportDateRole,
- ReportId
]
Originally I thought of a QAbstractListItem that returns a QAbstractListItem as a QObject-cast-to-QVariant role? It does not seem to fit the TreeItem/TreeModel example as the roles are different between parent/child.
Thoughts?