If you want to use QTableWidget
you can set header text yourself with QTableWidget::setVerticalHeaderLabels
.
If you switch to model/view approach you can reimplement QAbstractItemModel::headerData
:
QVariant MyModel::headerData (int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Vertical && role == Qt::DisplayRole)
{
QString persianDigit = ...;// get number in Persian from section value
return persianDigit;
}
else
{
return QAbstractItemModel::headerData(section, orientation, role);
}
}