How to display sub-rows of QAbstractItemModel in QTableView
问题 I have my own class that inherits from QAbstractItemModel which has tree structure. I use a couple of views, that display filtered data of this model, using classes derived from QSortFilterProxyModel. My model structure looks like this: root | -- A | |-A1 | |-A2 | |-A3 | -- B | |-B1 | |-B2 | ... and so on... Where A, B .... are "main rows" (children of the root), and A1, A2, ... B1, B2... are "children rows" - node rows appended to "main rows". Now, what I need to do is a QTableView that