QVariant RowNumberModel::data(const QModelIndex& index, int role = Qt::DisplayRole) const { if (role == Qt::DisplayRole && index.isValid()) return QVariant(QString::number(index.row() + 1)); return QVariant();}