1.利用该样式和多次设置QHeaderView::section的border样式可以实现下面的效果
同样的将QHeaderView::section {
background-color: #000;
color: white;
padding-left: 5px;
border-left:0px solid #000;
border-right:1px solid white;
border-top:0px solid #000;
}中border属性用加载border-image: url(:/);也可以实现。
QHeaderView {
background-color: #000;
color: white;
padding: 4px;
}
QHeaderView::section {
background-color: #000;
color: white;
padding-left: 5px;
border-left:0px solid #000;
border-right:1px solid white;
border-top:0px solid #000;
}
QHeaderView::section:checked
{
background-color: red;
}
/* style the sort indicator */
QHeaderView::down-arrow {
image: url(:/);
}
QHeaderView::up-arrow {
image: url(:/);
position:right;
}