tableWidget->horizontalHeader()->setStyleSheet("color: red"); tableWidget->verticalHeader()->setStyleSheet("color: red");