Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTextTable
-
Hi, how set text background color in a table cells?
-
@bogdann
tableWidget->setItem(row, column, new QTableWidgetItem);
tableWidget->item(row, column)->setBackground(Qt::red);
-
@Taz742 Me need QTextTable, not QTableWidget
-
Hi bogdann,
Try this :
QTextTableCell cell = table->cellAt(2, 3); QTextCharFormat format = cell.format(); format.setBackground(Qt.blue); cell.setFormat(format);
Eddy