82 lines
2.1 KiB
Plaintext
82 lines
2.1 KiB
Plaintext
|
/**********首先指定是水平还是竖直*不添加此代码,下方不起作用******/
|
|||
|
QSlider::groove:horizontal {
|
|||
|
border: 0px solid #bbb;
|
|||
|
}
|
|||
|
/*1.滑动过的槽设计参数*/
|
|||
|
QSlider::sub-page:horizontal {
|
|||
|
/*槽颜色*/
|
|||
|
background:#05A6EC;
|
|||
|
/*外环区域倒圆角度*/
|
|||
|
border-radius: 4px;
|
|||
|
/*上遮住区域高度*/
|
|||
|
margin-top:14px;
|
|||
|
/*下遮住区域高度*/
|
|||
|
margin-bottom:14px;
|
|||
|
/*width在这里无效,不写即可*/
|
|||
|
/*****/
|
|||
|
margin-left:8px;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
/*2.未滑动过的槽设计参数*/
|
|||
|
QSlider::add-page:horizontal {
|
|||
|
/*槽颜色*/
|
|||
|
background: #ECEBEB;
|
|||
|
/*外环大小0px就是不显示,默认也是0*/
|
|||
|
border: 0px solid #777;
|
|||
|
/*外环区域倒圆角度*/
|
|||
|
border-radius: 4px;
|
|||
|
/*上遮住区域高度*/
|
|||
|
margin-top:14px;
|
|||
|
/*下遮住区域高度*/
|
|||
|
margin-bottom:14px;
|
|||
|
|
|||
|
margin-right:8px;
|
|||
|
}
|
|||
|
|
|||
|
/********使用图片填充滑块效果***********/
|
|||
|
QSlider::handle:horizontal {
|
|||
|
width: 43px;
|
|||
|
background:transparent;
|
|||
|
background-image: url(:/DependFile/Source/channel/slder.png);
|
|||
|
margin: -0px -0px -0px -0px;
|
|||
|
}
|
|||
|
|
|||
|
/********radioButton效果***********/
|
|||
|
QRadioButton::indicator:unchecked{
|
|||
|
image: url(:/DependFile/Source/radioButton/normal.png);
|
|||
|
width:20;
|
|||
|
height:20;
|
|||
|
}
|
|||
|
|
|||
|
QRadioButton::indicator:checked{
|
|||
|
image: url(:/DependFile/Source/radioButton/checked.png);
|
|||
|
width:20;
|
|||
|
height:20;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/* 未下拉时,QComboBox的样式 */
|
|||
|
QComboBox {
|
|||
|
border: 1px solid gray; /* 边框 */
|
|||
|
border-radius: 3px; /* 圆角 */
|
|||
|
padding: 1px 18px 1px 3px; /* 字体填衬 */
|
|||
|
color: #000;
|
|||
|
font: 20px "黑体";
|
|||
|
background: transparent;
|
|||
|
}
|
|||
|
|
|||
|
/* 下拉后,整个下拉窗体样式 */
|
|||
|
QComboBox QAbstractItemView {
|
|||
|
outline: 0px solid gray; /* 选定项的虚框 */
|
|||
|
border: 0px solid gray; /* 整个下拉窗体的边框 */
|
|||
|
color: black;
|
|||
|
background-color: #C3E4F3; /* 整个下拉窗体的背景色 */
|
|||
|
selection-background-color: lightgreen; /* 整个下拉窗体被选中项的背景色 */
|
|||
|
font: 20px "黑体";
|
|||
|
}
|
|||
|
|
|||
|
/* 下拉后,整个下拉窗体每项的样式 */
|
|||
|
QComboBox QAbstractItemView::item {
|
|||
|
height: 50px; /* 项的高度(设置pComboBox->setView(new QListView());后,该项才起作用) */
|
|||
|
}
|