QSS样式

 

QPushButton常用样式

QPushButton

{

color:rgb(255,255,255);

background-color:rgb(39, 100, 255);

border-radius:4px;

opacity: 1.0;

}

QPushButton:pressed

{

color:rgb(255, 255, 255);

background-color:rgb(0, 170, 20);

opacity: 0.5;

}

//QListWidget 常用样式

QListWidget{

border:1px solid gray;

color:black;

outline:0px;

height:40px;

}

QListWidget::Item{

padding-top:4px;

padding-bottom:4px;

min-height:30px;

}

QListWidget::item:selected

{

background:rgb(39, 100, 255);

color:rgb(255, 255, 255);

}

QListWidget::item:!selected

{

color:rgb(0, 0, 0);

background:rgb(255, 255, 255);

}

//QTabWidget 样式

QTabBar::tab {

 

min-height: 30px;

font-size: 12px;

 

}

QTabBar::tab:selected {

background:rgb(39, 100, 255);

color: rgb(255, 255, 255);

border-radius:4px;

}

QTabBar::tab:!selected {

background:rgb(255, 255, 255);

color: rgb(0, 0, 0);

}

//QCombobox 样式

QComboBox {

background-color: rgb(255,255,255);

color: rgb(0, 0, 0);

border: 1px solid #333333;

}

QComboBox:editable {
    background: white;
}
 
QComboBox:!editable, QComboBox::drop-down:editable {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
                                 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
}
 
/* QComboBox gets the "on" state when the popup is open */
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
                                stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
}
 
QComboBox:on { /* shift the text when the popup opens */
    padding-top: 3px;
    padding-left: 4px;
}
QComboBox::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
 
    border-left-width: 1px;
    border-left-color: darkgray;
    border-left-style: solid; /* just a single line */
    border-top-right-radius: 3px; /* same radius as the QComboBox */
    border-bottom-right-radius: 3px;
}
 
QComboBox::down-arrow {
    image: url(/usr/share/icons/crystalsvg/16x16/actions/1downarrow.png);
}
 
QComboBox::down-arrow:on { /* shift the arrow when popup is open */
    top: 1px;
    left: 1px;

 

QSlider 样式

QSlider::groove:horizontal {

border: 0px solid #bbb;

}

 

QSlider::sub-page:horizontal {

background: rgb(235,97,0);

border-radius: 0px;

margin-top:8px;

margin-bottom:8px;

}

 

QSlider::add-page:horizontal {

background: rgb(255,255, 255);

border: 0px solid #777;

border-radius: 2px;

margin-top:8px;

margin-bottom:8px;

}

 

QSlider::handle:horizontal {

background: rgb(255,153,102);

border: 1px solid rgb(255,153,102);

width: 14px;

height:10px;

border-radius: 7px;

margin-top:2px;

margin-bottom:2px;

}

 

QSlider::handle:horizontal:hover {

background: rgb(255,128,6);

border: 1px solid rgba(102,102,102,102);

border-radius: 7px;

}

 

QSlider::sub-page:horizontal:disabled {

background: #bbb;

border-color: #999;

}

 

QSlider::add-page:horizontal:disabled {

background: #eee;

border-color: #999;

}

 

QSlider::handle:horizontal:disabled {

background: #eee;

border: 1px solid #aaa;

border-radius: 4px;

}

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值