Попробуйте что-нибудь подобное.Я написал этот код прямо здесь, поэтому idk работает или нет.
ItemDelegatePaint::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const {
if(index.row() == 1) /*check for your row*/ {
painter->fillRect(option.rect, Qt::red);
painter->setPen(QColor(Qt::white));
painter->drawText(option.rect, Qt::AlignCenter, index.data(Qt::DisplayRole).toString());
} else {
QStyledItemDelegate::paint(painter, option, index);
}
}