C++ (Qt)void QStandardItem::setData ( const QVariant & value, int role = Qt::UserRole + 1 )
C++ (Qt)/*QTableView* view;QStandardItemModel* model; somewhere in UI file.*/QStandardItem* item = model->item(0,0);if (item){ QFont font = view->font(); font.setUnderline(true); item->setData(font, Qt::FontRole);}