MainWindow 0 0 800 600 MainWindow 190 140 113 25 80 350 471 131 #groupBox{background:white;} GroupBox 50 60 351 43 /**********首先指定是水平还是竖直*不添加此代码,下方不起作用******/ QSlider::groove:horizontal { border: 0px solid #bbb; } /*1.滑动过的槽设计参数*/ QSlider::sub-page:horizontal { /*槽颜色*/ background: #05F6CC; /*外环区域倒圆角度*/ 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; } 20 Qt::Horizontal 420 150 131 41 黑体 12 /* 未下拉时,QComboBox的样式 */ QComboBox { border: 1px solid gray; /* 边框 */ border-radius: 3px; /* 圆角 */ padding: 1px 18px 1px 3px; /* 字体填衬 */ color: #000; background: transparent; } /* 下拉后,整个下拉窗体样式 */ QComboBox QAbstractItemView { outline: 2px solid gray; /* 选定项的虚框 */ border: 1px solid yellow; /* 整个下拉窗体的边框 */ color: black; background-color: white; /* 整个下拉窗体的背景色 */ selection-background-color: lightgreen; /* 整个下拉窗体被选中项的背景色 */ } /* 下拉后,整个下拉窗体每项的样式-此项起作用后,整个下拉窗体的样式则被顶替了 */ QComboBox QAbstractItemView::item { height: 50px; /* 项的高度(设置pComboBox->setView(new QListView());后,该项才起作用) */ font: normal normal 25px "黑体";/********字体未起作用***********/ } /* 下拉后,整个下拉窗体越过每项的样式 */ QComboBox QAbstractItemView::item:hover { color: #FFFFFF; background-color: lightgreen; /* 整个下拉窗体越过每项的背景色 */ } /* 下拉后,整个下拉窗体被选择的每项的样式 */ QComboBox QAbstractItemView::item:selected { color: #FFFFFF; background-color: lightgreen; } /* QComboBox中的垂直滚动条 */ QComboBox QAbstractScrollArea QScrollBar:vertical { width: 10px; background-color: #d0d2d4; /* 空白区域的背景色 灰色green */ } QComboBox QAbstractScrollArea QScrollBar::handle:vertical { border-radius: 5px; /* 圆角 */ background: rgb(160,160,160); /* 小方块的背景色深灰lightblue */ } QComboBox QAbstractScrollArea QScrollBar::handle:vertical:hover { background: rgb(90, 91, 93); /* 越过小方块的背景色yellow */ } /* 下拉框样式 */ QComboBox::drop-down { subcontrol-origin: padding; /* 子控件在父元素中的原点矩形。如果未指定此属性,则默认为padding。 */ subcontrol-position: top right; /* 下拉框的位置(右上) */ width: 25px; /* 下拉框的宽度 */ border-left-width: 1px; /* 下拉框的左边界线宽度 */ border-left-color: darkgray; /* 下拉框的左边界线颜色 */ border-left-style: solid; /* 下拉框的左边界线为实线 */ border-top-right-radius: 3px; /* 下拉框的右上边界线的圆角半径(应和整个QComboBox右上边界线的圆角半径一致) */ border-bottom-right-radius: 3px; /* 同上 */ } 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 190 250 131 41 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 } RadioButton 590 150 161 41 黑体 -1 false false /* 未下拉时,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());后,该项才起作用) */ } 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 新建项目 0 0 800 21