How to change the header background color of a QTableView

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

posted on 2019-03-12 13:52  liujx2019  阅读(749)  评论(0编辑  收藏  举报

导航