Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.3
-
None
-
Linux Debian
Description
I try to change column order from my model source by subclassing QSortFilterProxyModel method mapToSource.
It works fine except when there is no row (in source model or because they have been filtered by the QSortFilterProxyModel).
I modify the example customsortfiltermodel to add a mapToSource methods that exchange the 2 first columns.
You'll see it works fine at first, then the 2 columns come back to their original order when you filter all rows with date widget.
I think it comes from the qsortfilterproxymodel headerData methods which doesn't call mapToSource method when row or column number is equal to 0.