I have a data structure like this:
Qt Code:
struct List { int32_t id {-1}; int32_t seen {0}; int32_t total {0}; int32_t lastModified {-1}; bool isFavorite {false}; bool isWatchlist {false}; bool isDislike {false}; QList<List> children {}; }To copy to clipboard, switch view to plain text mode
I load the data in a model derived from QAbstractListModel which is attached to a default QListView and a custom delegate then renders the List objects like this:
These lists can also have children. And those children can have other children. And each "level" should have some indentation compared to its parent. I'd like to render each list with the above delegate. What would be the easiest way to do this? I can change the data structure if needed.
Bookmarks