Reputation: 11651
In my FilterProxyModel I would like to Remove columns 2 and 5 from my view. So I am doing like this
proxy_filter->removeColumns(2,1);
proxy_filter->removeColumns(5,1);
However only column 2 is removed and column 5 is still present any suggestions on how to resolve this issue ?
Upvotes: 1
Views: 498
Reputation: 351
I haven't used QsortFilterProxyModel before but I think the issue happened because the column index has changed
proxy_filter->removeColumns(2,1); // column 2 is removed.
proxy_filter->removeColumns(5,1); // then column 5 now is column 4
Let remove column 4 instead!
Upvotes: 1