1、无样式
2、设置被选中节点的字体颜色和背景颜色
QTreeView::item:selected{
color:#E7ECF0;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);
}
3、设置悬浮节点的字体颜色和背景颜色
QTreeView::item:hover{
color:#ffffff;
background:#ff0000;
}
4、设置节点的上下左右的内边距为5,外边距为0
QTreeView::item{
padding:5px;
margin:0px;
}
4、设置QTreeView的背景颜色
QTreeView{
background:#288aeb;
}