That's can start from 0
So, i chane like this
QVariant MyProxy
::headerData(int section, Qt
::Orientation orientation,
int role
) const { if(orientation!=Qt::Vertical || role!=Qt::DisplayRole)
return section+1;
}
QVariant MyProxy::headerData(int section, Qt::Orientation orientation, int role) const {
if(orientation!=Qt::Vertical || role!=Qt::DisplayRole)
return QSortFilterProxyModel::headerData(section, orientation, role);
return section+1;
}
To copy to clipboard, switch view to plain text mode
Thank's for your sample code. Solved now.
Bookmarks