You can set the style sheet on the QTableView ui->tableView->setStyleSheet("QHeaderView::section { background-color:red }"); for more info see http://doc.qt.io/qt-4.8/stylesheet-examples.html…
鼠标移动到.移出DIV时修改DIV的颜色: 1.Change the font and Div background color--function <div style="width:200px;height:200px;border:1px solid #ccc;color:#555" onmouseover="size()" onmouseout="size1()" id="d1"> sajdaskjdasl…