If you specified item's font already, QTableWidget's font is ignored.
You can change the font size as follows.
fnt.setPointSize(30);
fnt.setFamily("Arial");
const int rowCount = tableWidget->rowCount();
const int columnCount = tableWidget->columnCount();
for(int i = 0; i < rowCount; ++i) {
for(int j = 0; j < columnCount; ++j) {
selectedItem->setFont(fnt);
}
}
QFont fnt;
fnt.setPointSize(30);
fnt.setFamily("Arial");
const int rowCount = tableWidget->rowCount();
const int columnCount = tableWidget->columnCount();
for(int i = 0; i < rowCount; ++i) {
for(int j = 0; j < columnCount; ++j) {
QTableWidgetItem* selectedItem = tableWidget->item(i, j);
selectedItem->setFont(fnt);
}
}
To copy to clipboard, switch view to plain text mode
I'm sorry in poor English.
Bookmarks