How to only display specific columns using QIdentityProxyModel
Solved
General and Desktop
-
wrote on 25 Nov 2019, 12:47 last edited by
I have a tableview with n columns, new columns can be added and removed dynamically.
I now want to display that tableview, but only display two very specific columns (I do have the indices of those columns).I tried to set up proxy models to only return something valid for indicies of those columns, or to change
columnCount
but neither method worked - what am I missing? -
wrote on 25 Nov 2019, 13:06 last edited by
Just found out about
QSortFilterProxyModel::filterAcceptsColumn
which provides an integer for the column-index and hence suits my usecase perfectly. Still unsure why I couldn't get it to work withmap(From/To)Source
though
2/2