QWidget{ background: transparent; border-radius: 8px; font-family: 思源黑体R; font-weight: 400; font-size: 14px; color: #3A3F63; line-height: 21px; text-align: left; font-style: normal; } QWidget#widget { border-radius: 8px; background: #FFFFFF; } /* 分割线 */ QLabel#label_line1 { background: #E6E9F4; } /* 左上角标题 */ QLabel#label_title { font-family: 思源黑体R; font-weight: bold; font-size: 18px; color: #3A3F63; line-height: 27px; text-align: left; font-style: normal; text-transform: uppercase; } /* 警告label */ QLabel#label_warn { font-weight: 400; font-size: 14px; color: #D21F21; line-height: 21px; text-align: left; font-style: normal; } /*********** 按钮设置 ***********/ QPushButton{ text-align: center; font-family: 思源黑体M; font-weight: 400; font-size: 14px; line-height: 21px; } /* 关闭按钮 */ QPushButton#pBtn_close{ image: url(:/Standard_ICON/Dialog_close.png); } QPushButton#pBtn_close:hover { image: url(:/Standard_ICON/Dialog_close2.png); } /********* 普通方框按钮三种状态效果 *********/ QPushButton#pBtn_cancel:enabled,#pBtn_getChannel:enabled { background: #FFFFFF; border-radius: 16px; border: 1px solid #E6E9F4; color: #3A3F63; } QPushButton#pBtn_cancel:hover,#pBtn_getChannel:hover { background: #FFFFFF; border-radius: 16px; border: 1px solid #4458FE; color: #4458FE; } /* 普通方框按钮 */ QPushButton#pBtn_getChannel:enabled { background: #FFFFFF; border-radius: 4px; border: 1px solid #E6E9F4; color: #3A3F63; } QPushButton#pBtn_getChannel:hover { background: #FFFFFF; border-radius: 4px; border: 1px solid #4458FE; color: #4458FE; } /********* 带有底色按钮三种状态效果 *********/ QPushButton#pBtn_ok { color:white; background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF); border-radius: 16px; } QPushButton#pBtn_ok:hover { color:white; background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF); border-radius: 16px; } 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 { border: 1px solid #E6E9F4; border-radius: 4px; background:#FFFFFF; padding-left: 12px; } QComboBox:disabled { background: rgba(0,0,0,0.04); border-radius: 4px; border: 1px solid #E6E9F4; padding-left: 12px; } QComboBox[Warn=true] { border: 1px solid #D21F21; border-radius: 4px; background:#FFFFFF; padding-left: 12px; } QComboBox[hover] { border: 1px solid #4458FE; border-radius: 4px; background:#FFFFFF; } /* 下拉箭头所在的位置方框 */ QComboBox::drop-down { width: 24px; border: none; } /* 下拉箭头图标 */ QComboBox::down-arrow { image: url(:/Standard_ICON/DownArrow.png); height:16px; width:16px; } /* 下拉条样式,就是view */ QComboBox QAbstractItemView { outline:0px solid gray; font-size:14px; background:#ffffff; color: #3A3F63; margin: 4px; border-radius: 2px; border: none; } /* 使下面两句生效,需要加上如下语句 */ /* m_comBoxDev->setView(new QListView()); */ QComboBox QAbstractItemView::item { font-size:14px; border-radius:2px; color: #3A3F63; padding-left: 8px; height: 30px; } QComboBox QAbstractItemView::item:selected { background: #EEF2FF; font-size:14px; color: #3a3f63; height: 30px; padding-left: 8px; } /******** 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; } /***************** QRadioButton *****************/ QRadioButton::indicator { width: 16px; height: 16px; } /* QRadioButton:disabled { color: #B8B8B8; } */ QRadioButton::indicator::unchecked { color: #3A3F63; image: url(:/Standard_ICON/Radio_Unchecked.png); } QRadioButton::indicator::checked { color: #3A3F63; image: url(:/Standard_ICON/Radio_Checked.png); } /****************** QLineEdit ******************/ QLineEdit { border: 1px solid #E6E9F4; border-radius: 4px; background:#FFFFFF; padding-left: 12px; }