码迷,mamicode.com
首页 > 其他好文 > 详细

QSS之QTreeView

时间:2014-08-01 20:13:22      阅读:2752      评论:0      收藏:0      [点我收藏+]

标签:qt   qss   qtreeview   

/*      QTreeView       */
QTreeView {
    alternate-background-color: yellow;
}

QTreeView {
    show-decoration-selected: 1;
}

QTreeView::item {
    border: 1px solid #d9d9d9;
    border-top-color: transparent;
    border-bottom-color: transparent;
}
/* 鼠标在QTreeView上面移动时的效果 */
QTreeView::item:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
    border: 1px solid #bfcde4;
}

QTreeView::item:selected {
    border: 1px solid #567dbc;
}
/* 节点被选中激活时的效果 */
QTreeView::item:selected:active{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
}

QTreeView::item:selected:!active {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf);
}

QTreeView::branch:has-siblings:!adjoins-item {
border-image: url(:/images/vline.png)0;
}

QTreeView::branch:has-siblings:adjoins-item {
border-image: url(:/images/branch-more.png)0;
}

QTreeView::branch:!has-children:!has-siblings:adjoins-item {
border-image: url(:/images/branch-end.png)0;
}

QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url(:/images/branch-closed.png);
}

QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url(:/images/branch-open.png);
}

注意:注释的时候一定要使用/*  */  




本文出自 “大白菜” 博客,请务必保留此出处http://zhengyongkun.blog.51cto.com/1163218/1533816

QSS之QTreeView,布布扣,bubuko.com

QSS之QTreeView

标签:qt   qss   qtreeview   

原文地址:http://zhengyongkun.blog.51cto.com/1163218/1533816

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!