IMO the model is the same in both cases, just the hierarchy differs, that's why I suggest to use a proxy -- to change the hierarchy. You might want to take a look at the source of QSortFilterProxyModel. In general you need to reimplement methods responsible for mapping indexes from the source model to the proxy model and vice versa.
Bookmarks