Loading

QT点击表格时,取消表头高亮

QTableWidget中,点击表格的行时,表头会被高亮选中。尤其在设置了表头样式后更加明显。

设置前:

  

//设置表头不高亮显示
tablewidget->horizontalHeader()->setHighlightSections(false);
//表头样式
tablewidget->horizontalHeader()->setStyleSheet("QHeaderView::section{background:rgb(2,20,130);color: white;}");

设置后:

  

 

posted @ 2022-01-26 20:31  记录学习的Lyx  阅读(817)  评论(0编辑  收藏  举报