/* ========================================================== * 通用样式 * ========================================================== */ QWidget { font-size: 14px; color: #D2D2D2; line-height: 21px; text-align: left; font-style: normal; border-radius: 8px; background: transparent; } QWidget#widget { background: rgba(0,0,0,0.01); } QWidget#widget_background { background-color: #464649; } QWidget#widget_top { /* background: rgba(108,105,124,0.2); */ border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom: 1px solid rgba(255,255,255,0.15); } QLabel#label_title { background: transparent; font-size: 18px; color: #EBEBEB; line-height: 27px; text-align: left; font-style: normal; text-transform: uppercase; } QLabel#label_selectChn { font-weight: 500; font-size: 16px; color: #D2D2D2; line-height: 22px; text-align: left; font-style: normal; text-transform: none; } QLabel#label_x1, #label_x2, #label_x3, #label_x4, #label_x5, #label_x6 { background: transparent; font-size: 14px; color: #F53F3F; text-align: left; font-style: normal; } QPushButton { text-align: center; } QPushButton#pBtn_close { background: transparent; border-radius: 4px; qproperty-icon: url(:/ICON/ICON/Close_Dark.png); qproperty-iconSize: 20px 20px; } QPushButton#pBtn_close[Hover = true] { background: transparent; border-radius: 4px; qproperty-icon: url(:/ICON/ICON/Close_pass.png); qproperty-iconSize: 20px 20px; border: 1px solid #438EFF; } /********* 普通椭圆按钮三种状态效果 *********/ QPushButton#pBtn_cancel, #pBtn_saveTotemplate { color: #EBEBEB; border: 1px solid rgba(255,255,255,0.25); border-radius: 16px; background: transparent; } QPushButton#pBtn_cancel:hover, #pBtn_saveTotemplate:hover { color: #EBEBEB; border: 1px solid rgba(255,255,255,0.25); border-radius: 16px; background: rgba(0,0,0,0.15); } /********* 带有底色椭圆按钮三种状态效果 *********/ QPushButton#pBtn_ok { color:white; background: #438EFF; border-radius: 16px; } QPushButton#pBtn_ok:hover { color:white; background: #5F9EFF; border-radius: 16px; } /********* 普通方框按钮三种状态效果 *********/ QPushButton#pBtn_deletePlan, #pBtn_editPlan { color: #EBEBEB; border: 1px solid rgba(255,255,255,0.25); border-radius: 4px; background: transparent; } QPushButton#pBtn_deletePlan:hover, #pBtn_editPlan:hover { color: #EBEBEB; border: 1px solid rgba(255,255,255,0.25); border-radius: 4px; background: rgba(0,0,0,0.15); } /********* 带有底色方框按钮三种状态效果 *********/ QPushButton#pBtn_addPlan { color:white; background: #438EFF; border-radius: 4px; } QPushButton#pBtn_addPlan:hover { color:white; background: #5F9EFF; border-radius: 4px; } QLabel#label_devWarn,QLabel#label_timeWarn,QLabel#label_actionWarn { /* font-weight: 400; */ font-size: 14px; color: #D21F21; line-height: 21px; text-align: left; font-style: normal; } /* ========================================================== * QComboBox(这个是在用的) * ========================================================== */ QComboBox:enabled { background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; font-size:14px; /* font-weight: 400; */ color:#D2D2D2; padding-left: 12px; } QComboBox:enabled[Warn=true] { background-color: transparent; border: 1px solid #D21F21; border-radius: 4px; font-size:14px; /* font-weight: 400; */ color:#3A3F63; padding-left: 12px; } /* 不能编辑的时候的样式,setEnable(false) */ QComboBox:!enabled { background:rgba(0,0,0,0.04); border: 1px solid #E6E9F4; border-radius: 4px; font-size:14px; /* font-weight: 400; */ color:rgba(58,63,99,0.65); padding-left: 12px; } QComboBox:hover { border: 1px solid #438EFF; border-radius: 4px; background:transparent; } /* 下拉箭头所在的位置方框 */ QComboBox::drop-down { width: 24px; border: none; } /* 下拉箭头图标 */ QComboBox::down-arrow { image: url(:/ICON/ICON/DownArrow_Dark.png); height:16px; width:16px; } /* 下拉条样式,就是view,整个下拉窗体的样式 */ QComboBox QAbstractItemView { background-color: #5C5E61; margin: 12px; outline:0px; font-size:14px; /* color: #3A3F63; */ border-radius: 4px; } /* 使下面两句生效,需要加上如下语句 */ /* m_comBoxDev->setView(new QListView()); */ QComboBox QAbstractItemView::item { background-color: #5C5E61; border-radius:4px; color: #D2D2D2; padding-left: 12px; height: 32px; } QComboBox QAbstractItemView::item:hover { color: #FFFFFF; border-radius:4px; background-color: #438EFF; } QComboBox QAbstractItemView::item:selected { color: #FFFFFF; border-radius:4px; background-color: #438EFF; } /******** combobox 滚动条 *********/ QComboBox QScrollBar::vertical{ /*主体部分*/ width:8px; background:transparent; border:none; border-radius:5px; } QComboBox QScrollBar::handle::vertical{ /*滑块主体*/ width: 8px; background: #E2E2E2; border-radius: 3px; min-width: 8px; } QComboBox QScrollBar::handle::vertical::hover{ background:transparent; } QComboBox QScrollBar::add-line::vertical{/*上箭头*/ border:none; } QComboBox QScrollBar::sub-line::vertical{/*下箭头*/ border:none; } /* ========================================================== * 时间报警红框 * ========================================================== */ TimeWidget { background: transparent; /* background: #373639; */ border-radius: 4px; padding-left:12px; border: 1px solid rgba(255,255,255,0.15); } TimeWidget:hover { background: transparent; /* background: #373639; */ border-radius: 4px; padding-left:12px; border: 1px solid #438EFF; } QPushButton#pBtn_selectTime { /* font-family: 思源黑体R; */ background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; font-size: 14px; /* font-weight: 400; */ padding-left: 12px; text-align: left; } QPushButton#pBtn_selectTime:hover { /* font-family: 思源黑体R; */ background: transparent; border: 1px solid #438EFF; border-radius: 4px; font-size: 14px; /* font-weight: 400; */ padding-left: 12px; text-align: left; } /* 报警红框 */ QPushButton#pBtn_selectTime[Warn=true] { background: transparent; border-radius: 4px; padding-left:12px; border: 1px solid #D21F21; } /* ========================================================== * 日期选择器 * ========================================================== */ CalendarDTEdit { background: transparent; border-radius: 4px; padding-left:12px; border: 1px solid rgba(255,255,255,0.15); } CalendarDTEdit:hover { border-radius: 4px; padding-left:12px; border: 1px solid #438EFF; } CalendarDTEdit[Warn=true] { border-radius: 4px; padding-left:12px; border: 1px solid #D21F21; } CalendarDTEdit:!enabled/* 或者disable */ { background: rgba(0,0,0,0.04); border: 1px solid #E6E9F4; } CalendarDTEdit::drop-down { padding-right: 8px; width: 16px; image: url(:/ICON/ICON/date_dark.png); } /* ========================================================== * QTabWidget * ========================================================== */ /* 设置 TabBar 的整体背景颜色 */ QTabBar { background: #555557; /* 整体背景颜色 */ border-radius: 2px; /* 圆角 */ } /* 设置标签的默认样式 */ QTabBar::tab { min-width: 66px; /* 标签最小宽度 */ min-height: 28px; /* 标签最小高度 */ border-radius: 2px; /* 圆角 */ margin: 6px; font-weight: 400; font-size: 14px; color: #B1B3B4; line-height: 20px; text-align: left; font-style: normal; text-transform: none; } /* 设置选中标签的样式 */ QTabBar::tab:selected { background: #438EFF; /* 选中标签的背景颜色 */ border-radius: 2px; /* 圆角 */ margin: 6px; /* 内缩 6px */ font-weight: 500; font-size: 14px; color: #FFFFFF; line-height: 20px; text-align: left; font-style: normal; text-transform: none; } QTabWidget::pane { border: none; /* 去掉边框 */ } QWidget#tab_week, #tab_special { background: #464649; border-radius: 0px; border: 0px solid rgba(255,255,255,0.15); }