Qt滚动条样式

2018-06-17 21:58:04来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

Qt手动设置滚动条的qss样式

 

QScrollBar:vertical {
     width: 14px;
     margin: 16px 0 16px 0;
     background: #eaeaea;
}

QScrollBar::handle:vertical {
     background: #c8c8c8;
     min-height: 16px;
     border-left: 1px solid #cccccc;
     border-right: 1px solid #cccccc;
     border-top: 1px solid #ffffff;
     border-bottom: 1px solid #bbbbbb;
}

QScrollBar::handle:vertical:hover {
     background: #606060;
     min-height: 16px;
     border-left: 1px solid #cccccc;
     border-right: 1px solid #cccccc;
     border-top: 1px solid #ffffff;
     border-bottom: 1px solid #bbbbbb;
}

 QScrollBar::add-line:vertical {
     background: #eaeaea;
     height: 15px;
     subcontrol-position: bottom;
     subcontrol-origin: margin;
     border-top: 1px solid #ffffff;
}

QScrollBar::sub-line:vertical {
     background: #eaeaea;
     height: 15px;
     subcontrol-position: top;
     subcontrol-origin: margin;
     border-bottom: 1px solid #bbbbbb;
}

 QScrollBar::add-line:vertical:hover {
     background: #606060;
     height: 15px;
     subcontrol-position: bottom;
     subcontrol-origin: margin;
     border-top: 1px solid #ffffff;
}

QScrollBar::sub-line:vertical:hover {
     background: #606060;
     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: 14px;
     margin: 0 16px 0 16px;
     background: #eaeaea;
}

QScrollBar::handle:horizontal {
     background: #c8c8c8;
     min-width: 16px;
     border-left: 1px solid #cccccc;
     border-right: 1px solid #cccccc;
     border-left: 1px solid #ffffff;
     border-right: 1px solid #bbbbbb;
}

QScrollBar::handle:horizontal:hover {
     background: #606060;
     min-width: 16px;
     border-left: 1px solid #cccccc;
     border-right: 1px solid #cccccc;
     border-left: 1px solid #ffffff;
     border-right: 1px solid #bbbbbb;
}

QScrollBar::add-line:horizontal {
     background: #eaeaea;
     width: 15px;
     subcontrol-position: right;
     subcontrol-origin: margin;
     border-left: 1px solid #ffffff;
}

QScrollBar::sub-line:horizontal {
     background: #eaeaea;
     width: 15px;
     subcontrol-position: left;
     subcontrol-origin: margin;
     border-right: 1px solid #bbbbbb;
}


QScrollBar::add-line:horizontal:hover {
     background: #606060;
     width: 15px;
     subcontrol-position: right;
     subcontrol-origin: margin;
     border-left: 1px solid #ffffff;
}

QScrollBar::sub-line:horizontal:hover {
     background: #606060;
     width: 15px;
     subcontrol-position: left;
     subcontrol-origin: margin;
     border-right: 1px solid #bbbbbb;
}

QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
     background: none;
}

 

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:各种方法配置 Visual Studio 第三方库

下一篇:lincode.41 最大子数组