QTreeWidget CSS样式

QTreeWidget{

font: 13pt "楷体";

color: rgb(26, 202, 255);

border:1px solid rgb(170, 170, 127);

border-radius:3px;

/*background-color: rgb(161, 230, 254);*/

}

 

QTreeWidget::item{

margin:6px;

background-clip: margin;

}

 

表头样式:

vstyle = "QHeaderView::section { \
\
color:rgb(255, 255, 255);\
border:1px solid rgb(170, 170, 127);\
border-bottom:1px solid #E0DDDC;\
border-radius:3.2px;\
font: 15pt \"楷体\";\
height:30px;}"
调用:
self.treeWidget_test.header().setStyleSheet(vstyle)
posted @ 2021-12-20 09:44  默*为  阅读(564)  评论(0编辑  收藏  举报