# 设置行头字体样式
self.tableWidget.verticalHeader().setStyleSheet("QHeaderView::section{background-color:lightblue;font:10pt "
"'宋体';color: blue;}")
上面代码实现的是所有列表头样式一样,我想让其中一个表头样式与其他的不一样,怎样实现?
#字体颜色(红色)
self.tableWidget_Software.item(1 ,0).setForeground(QBrush(QColor(255,0,0)))
#背景颜色(红色)
self.tableWidget_Software.item(1, 0).setBackground(QBrush(QColor(255, 0, 0)))