Your columnCount() method signature does not match the one from QAbstractItemModel, i.e. it is missing the const.

As far as C++ goes that is an overload and not invoked when the model's column count is to be evaluated. That still calls the one from QSortFilterProxyModel.

Cheers,
_