标签:手动 16px horizon eee bsp min add pre line
Qt手动设置滚动条的qss样式
QScrollBar:vertical { width: 16px; margin: 16px 0 16px 0; background: #dadada; } QScrollBar::handle:vertical { background: #eeeeee; min-height: 16px; border-top: 1px solid #ffffff; border-bottom: 1px solid #bbbbbb; } QScrollBar::add-line:vertical { background: #eeeeee; height: 15px; subcontrol-position: bottom; subcontrol-origin: margin; border-top: 1px solid #ffffff; } QScrollBar::sub-line:vertical { background: #eeeeee; height: 15px; subcontrol-position: top; subcontrol-origin: margin; border-bottom: 1px solid #bbbbbb; } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; } QScrollBar:horizontal { height: 16px; margin: 0 16px 0 16px; background: #dadada; } QScrollBar::handle:horizontal { background: #eeeeee; min-width: 16px; border-left: 1px solid #ffffff; border-right: 1px solid #bbbbbb; } QScrollBar::add-line:horizontal { background: #eeeeee; width: 15px; subcontrol-position: right; subcontrol-origin: margin; border-left: 1px solid #ffffff; } QScrollBar::sub-line:horizontal { background: #eee; width: 15px; subcontrol-position: left; subcontrol-origin: margin; border-right: 1px solid #bbbbbb; } QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { background: none; }
标签:手动 16px horizon eee bsp min add pre line
原文地址:http://www.cnblogs.com/lucienbao/p/QScrollBar_Qss.html