ui.treeWidget_contacts->verticalScrollBar()->setStyleSheet("QScrollBar:vertical"
"{"
"width:16px;"
"background:rgba(0,0,0,0%);"
"margin:2px;"
"padding-top:16px;"
"padding-bottom:16px;"
"}"
"QScrollBar::handle:vertical"
"{"
"width:12px;"
"background:rgba(0,0,0,25%);"
" border-radius:6px;"
"min-height:20;"
"}"
"QScrollBar::handle:vertical:hover"
"{"
"width:12px;"
"background:rgba(0,0,0,38%);"
" border-radius:6px;"
"min-height:20;"
"}"
"QScrollBar::add-line:vertical"
"{"
"height:12px;width:12px;"
"border-image:url(:/Yunshixun/Resources/down-Arrow.png);"
"subcontrol-position:bottom;"
"}"
"QScrollBar::sub-line:vertical"
"{"
"height:12px;width:12px;"
"border-image:url(:/Yunshixun/Resources/up-Arrow.png);"
"subcontrol-position:top;"
"}"
"QScrollBar::add-line:vertical:hover"
"{"
// "border-image:url(:/images/a/4.png);"
"subcontrol-position:bottom;"
"}"
"QScrollBar::sub-line:vertical:hover"
"{"
// "border-image:url(:/images/a/2.png);"
"subcontrol-position:top;"
"}"
"QScrollBar::add-page:vertical"
"{"
"background:rgba(0,0,0,10%);"
"background:rgba(0,0,0,10%);"
"border-top-left-radius:0px;"
"border-top-right-radius:0px;"
"border-bottom-left-radius :6px;"
"border-bottom-right-radius:6px;"
"}"
"QScrollBar::sub-page:vertical"
"{"
"background:rgba(0,0,0,10%);"
"border-top-left-radius:6px;"
"border-top-right-radius:6px;"
"border-bottom-left-radius :0;"
"border-bottom-right-radius:0px;"
"}"
);
qt 滚动条自定义样式
最新推荐文章于 2024-06-18 11:52:43 发布