Why not QAbstractItemModel?
Why not QAbstractItemModel?
Because it looked easier (I hadn't idea why I need QAbstractItemModel). I had class for List of Lists which was QAbstractListModel and child List which also was QAbstractListModel (which I planned to return as a property through parent's data() method).
Why this is bad? (or why this was bad? I'm going to rewrite it based on responses in this thread)
You want a hierarchical model thus it seems to me implementing a proper model will do the job. I don't think returning a list in each model which will in turn return a list of its own is a better approach.
Easier to implement a list with QAbstractListModel at its base.
QAbstractItemModel requires implementations for columnCount(), index() and parent(), the latter two usually not trivial, and neither is needed for a list.
Aside from ribtoks data not being hierachical as it turns out, I don't think QtQuick can deal with tree models at this point.
Cheers,
_
Bookmarks