The constructor for QSortFilterProxyModel doesn’t set the source model; it sets the QObject that owns the proxy model. (You can let that default to null if you will delete the proxy model yourself.) You have to use QSortFilterProxyModel::setSourceModel to set the source model.
Bookmarks