Hi
I would like to set into the tableview "part of data in a child" of my model.
rootIndex will show me ALL item of a child. But, I need to show part of a child in a certain tableview.
Cheers,
Omid
Hi
I would like to set into the tableview "part of data in a child" of my model.
rootIndex will show me ALL item of a child. But, I need to show part of a child in a certain tableview.
Cheers,
Omid
You could use a proxy model to filter out the rows/columns you don't want to appear.
Cheers,
_
Omid123 (14th February 2015)
To expand on anda_skoa's answer, you need a class derived from QSortFilterProxyModel that reimplements the QSortFilterProxyModel::filterAcceptsRow() and / or QSortFilterProxyModel::filterAcceptsColumn() methods. These methods return true if the row or column should be displayed, false if not. You set your current model as the source model for the proxy, and you set the proxy as the model used by the view.
Omid123 (14th February 2015)
Bookmarks