QT中一份用于项目的QSS样式,包括了多个控件

/* QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{ */
/* border:1px solid #1B89CA; */
/* border-radius:0px; */
/* } */


/* .QFrame{ 
border:1px solid #5CACEE; 
border-radius:5px; 
 } 
*/
/* QWidget#widget_title{ */
/* background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); */
/* } */


/* QLabel#lab_Ico,QLabel#lab_Title{ */
/* border-radius:0px; */
/* color: #F0F0F0; */
/* background-color:rgba(30,30,30,100); */
/* border-style:none; */
/* } */
QWidget#Wwidget,QWidget#Pwidget{
background-color: rgb(255, 255, 255);
border-radius: 10px;
}

QWidget#diawidget{
border-bottom: 1px solid #a1a1a1;
border-left:1px solid #a1a1a1;
border-right:1px solid #a1a1a1;
border-top:0px solid #a1a1a1;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
border-top-left-radius:0px;
border-top-right-radius:0px;
}
QWidget#topwidget{
border-bottom: 0px solid #a1a1a1;
border-left:1px solid #a1a1a1;
border-right:1px solid #a1a1a1;
border-top:1px solid #a1a1a1;
    border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
border-top-left-radius:10px;
border-top-right-radius:10px;
}
QDialog#ScanDataDlg{
background-color: rgb(231, 231, 231);
border-radius:0px;
}
QLabel {
background:none;
font: 16pt "PingFang SC";
color: rgb(85, 85, 85);
}
QLineEdit {
border: 1px solid #a1a1a1;
border-radius: 3px;
padding: 2px;
background:none;
font: 16pt "PingFang SC";
font: regular;
selection-background-color: rgba(176,221,244);
color: rgb(85, 85, 85);
}
QLineEdit:enabled:hover, QLineEdit:enabled:focus {
       border: 1px solid rgba(52,178,237);
}


QLineEdit:!enabled, QCheckBox:!enabled,QComboBox:!enabled{
        background-color: rgb(231, 231, 231);
}


QLineEdit[echoMode="2"] { 
lineedit-password-character: 9679; 
}
QLineEdit#doctorEdit:enabled,QLineEdit#addrEdit:enabled {
       background-color: rgba(152,211,243);
}
QLineEdit#doctorEdit:enabled:hover, QLineEdit#addrEdit:enabled:focus {
        background-color: rgba(176,221,244);
}


QGroupBox{
border: 1px solid #5CACEE;
border-radius: 3px;
font: 12pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}
QGroupBox::title {


subcontrol-position: top center;
    margin-bottom: 20px;
font: 12pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}




QStackedWidget#settingstackedWidget{
border: 3px solid #5CACEE;      
}
QPushButton{
color: rgb(85, 85, 85);
padding: 5px;
border-radius:3px;
background: rgba(237,237,237);
border: 1px solid rgba(207,207,207);
    /* border-image: url(:/images/button.png); */
font: 16pt "PingFang SC";
}


QPushButton[focusPolicy="0"] {
border-style: none;
border: 0px;
color: #F0F0F0;
padding: 0px;
min-height: 10px;
border-radius:3px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QPushButton:hover{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}


QPushButton:pressed{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}


QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max{
border-radius:0px;
color: #F0F0F0;
background-color:rgba(0,0,0,0);
border-style:none;
}


QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #5CACEE);
}


QPushButton#btnMenu_Close:hover{
background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
}


QPushButton#helpBtn,QPushButton#scanBtn,QPushButton#paramsBtn,QPushButton#cancelBtn,QPushButton#okBtn,QPushButton#chanelBtn,QPushButton#instruBtn,
QPushButton#outputexcel,QPushButton#printselrow,QPushButton#scanreport,QPushButton#openreport,QPushButton#producereport,QPushButton#resultprintpinece,QPushButton#resultprint{
border-style: none;
border: 0px;
color: rgb(255, 255, 255);
background-color:rgba(52,178,237);
border-radius:25px;
font: 16pt "PingFang SC";
/* background:transparent;*/
}
QPushButton#scanBtn:disabled{
background-color:gray;
}
QPushButton#closeBtn,QPushButton#returnBtn{
border-style: none;
color:white;
border: 0px;
background-color:rgba(242,79,80);
border-radius:25px;
/* background:transparent;*/
}


QPushButton#guanbi{
    border-image: url(:/images/guanbi.png);
border-style: none;
border: 0px;
  
}
QPushButton#guanbi:pressed{
     border-image: url(:/images/guanbi_1.png);
  
}
QPushButton#helpBtn:pressed,QPushButton#scanBtn:pressed,QPushButton#paramsBtn:pressed,QPushButton#cancelBtn:pressed,QPushButton#okBtn:pressed,QPushButton#chanelBtn:pressed,QPushButton#instruBtn:pressed,
QPushButton#outputexcel:pressed,QPushButton#printselrow:pressed,QPushButton#scanreport:pressed,QPushButton#openreport:pressed,QPushButton#producereport:pressed,QPushButton#resultprintpinece:pressed,QPushButton#resultprint:pressed{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}


QPushButton#closeBtn:pressed,QPushButton#returnBtn:pressed{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #db2e2e, stop:1 #db2e2e);
}


QPushButton#pushButton_11,QPushButton#pushButton_12{
background: none;
    border-radius:0px;
}


QPushButton#pushButton_3,QPushButton#pushButton_4,QPushButton#pushButton_5,QPushButton#pushButton_6,QPushButton#pushButton_10,QPushButton#updateSQL,QPushButton#configprintBtn,QPushButton#savepathBtn,
QPushButton#channel_1,QPushButton#channel_2,QPushButton#channel_3,QPushButton#channel_4,QPushButton#channel_5,QPushButton#channel_6,QPushButton#channel_7,QPushButton#channel_8,
QPushButton#clearBtn,QPushButton#movetoBtn,QPushButton#selectBtn,QPushButton#preBtn,QPushButton#nextBtn,QPushButton#goBtn{
color: rgb(85, 85, 85);
padding: 5px;
border-radius:3px;
border: none;
    border-image: url(:/images/button.png);
font: 16pt "PingFang SC";
}


QPushButton#pushButton_3:pressed,QPushButton#pushButton_4:pressed,QPushButton#pushButton_5:pressed,QPushButton#pushButton_6:pressed,QPushButton#pushButton_10:pressed,QPushButton#updateSQL:pressed,QPushButton#configprintBtn:pressed,QPushButton#savepathBtn:pressed,
QPushButton#channel_1:pressed,QPushButton#channel_2:pressed,QPushButton#channel_3:pressed,QPushButton#channel_4:pressed,QPushButton#channel_5:pressed,QPushButton#channel_6:pressed,QPushButton#channel_7:pressed,QPushButton#channel_8:pressed,
QPushButton#clearBtn:pressed,QPushButton#movetoBtn:pressed,QPushButton#selectBtn:pressed,QPushButton#preBtn:pressed,QPushButton#nextBtn:pressed,QPushButton#goBtn:pressed{
color: rgb(85, 85, 85);
padding: 5px;
border-radius:3px;
border: none;
    border-image: url(:/images/button_1.png);
font: 16pt "PingFang SC";
}


QPushButton#switchBtn,QPushButton#upBtn,QPushButton#downBtn,QPushButton#leftBtn,QPushButton#rightBtn{
border-style: none;
border: 0px;
color: rgb(255, 255, 255);
background-color:rgba(52,178,237);
border-radius:5px;
font: 16pt "PingFang SC";
}


QPushButton#switchBtn:pressed,QPushButton#upBtn:pressed,QPushButton#downBtn:pressed,QPushButton#leftBtn:pressed,QPushButton#rightBtn:pressed{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}
QToolButton#toolButton,QToolButton#toolButton_2,QToolButton#toolButton_3{
border: 2px solid #FFFFFF;
color: #F0F0F0;
padding: 20px;
border-radius:10px;
background-color: rgb(31,145,218); 
font: 22pt;
font: regular;
}


QToolButton#toolButton:pressed,QToolButton#toolButton_2:pressed,QToolButton#toolButton_3:pressed{
background-color:rgba(15,100,165);
}


QToolButton#toolButton:disabled,QToolButton#toolButton_2:disabled{
background-color:gray;
}


QToolButton#toolButton:hover,QToolButton#toolButton_2:hover,QToolButton#toolButton_3:hover{
background-color:rgba(15,100,165);
}
QToolButton#qt_calendar_yearbutton,QToolButton#qt_calendar_monthbutton {
color: #F0F0F0;
padding: 0px;
margin:1px;
border-radius:0px;
background: rgba(57,88,119);
font: 14pt;
font: regular;
}
QWidget#qt_calendar_navigationbar 
{
color: #F0F0F0;
padding: 0px;
min-height:35px;
border-radius:0px;
background: rgba(57,88,119); 
font: 14pt;
font: regular;
}
QPrevNextCalButton#qt_calendar_prevmonth {
    image:url(:/images/premonth.png); 
min-height:32px;
min-width:32px;
}


QPrevNextCalButton#qt_calendar_nextmonth{
image:url(:/images/nextmonth.png); 
min-height:40px;
min-width:40px;
}


QCheckBox {
spacing: 2px; 
font: 16pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}


QCheckBox::indicator {
min-width: 23px;
min-height: 23px;
}


QCheckBox::indicator:unchecked {
image: url(:/images/unchecked.png);
}


QCheckBox::indicator:checked {
image: url(:/images/checked.png); 
}


QRadioButton {
spacing: 2px;
font: 16pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}


QRadioButton::indicator {
min-width: 24px; 
min-height: 24px; 
}


QRadioButton::indicator::unchecked {
image: url(:/images/radio_uncheck.png); 
}


QRadioButton::indicator::checked {
image: url(:/images/radio_check.png); 
}


QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit,QSpinBox,QDoubleSpinBox{
border-radius: 3px;
min-width:40px;
padding: 1px 10px 1px 5px;
border: 1px solid #a1a1a1;
font: 16pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}
QComboBox:enabled:hover, QComboBox:enabled:focus{
    border: 1px solid rgba(52,178,237);
}


QComboBox::drop-down{
subcontrol-origin: padding;
subcontrol-position: top right;
min-width: 40px; 
min-height:40px;
/* border-left-width: 1px; */
border-left-style: solid;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-image: url(:/images/drop_down.png); 

}


QComboBox::down-arrow{
border-image: url(:/images/drop_down_1.png); 
    min-width:41px;
    min-height:42px;


}


/* QComboBox::drop-down:on{ */
    /* top:1px; */
/* } */


QComboBox QAbstractItemView,QAbstractItemView
{
  /*  height:1000px;
   border: 1px solid #a1a1a1;
   color: red;
   font:14px;
   selection-color: green;   */
   selection-background-color:rgba(52,178,237); 
/*    padding:5px; */
}


/* QComboBox QAbstractItemView::item
{
height: 32px;
min-height:32px;
}
 */
QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{
/* subcontrol-origin: padding; */
/* subcontrol-position: top right; */
min-width: 41px; 
min-height:42px;
border-image: url(:/images/date.png); 

}
QDateEdit::down-arrow{
/* subcontrol-origin: padding; */
/* subcontrol-position: top right; */
min-width: 41px; 
min-height:42px;
border-image: url(:/images/date.png); 


}
/*
QTimeEdit::down-button,QDateEdit::down-button,QDateTimeEdit::down-button,QDoubleSpinBox::down-button,QSpinBox::down-button{
    border-image:url(:/images/date.png);
    min-width:28px;
    min-height:27px;
    padding:0px 5px 2px 0px;
}




QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{
subcontrol-origin: padding;
subcontrol-position: top right;
min-width: 31px; 
min-height:31px;
margin:1px;
border-left-width: 1px;
border-left-style: solid;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-image: url(:/images/drop_down.png); 

}
QDateEdit[calendarPopup="true"]::down-arrow,QTimeEdit[calendarPopup="true"]::down-arrow,QDateTimeEdit[calendarPopup="true"]::down-arrow {
border-image: url(:/images/drop_down_1.png); 
    min-width:31px;
    min-height:31px;
margin:1px;
}
QTimeEdit::down-button:pressed,QDateEdit::down-button:pressed,QDateTimeEdit::down-button:pressed,QDoubleSpinBox::down-button:pressed,QSpinBox::down-button:pressed,QSpinBox::down-button:pressed{
       bottom:-2px;
}


QTimeEdit::up-button,QDateEdit::up-button,QDateTimeEdit::up-button,QDoubleSpinBox::up-button,QSpinBox::up-button{
    border-image:url(:/images/array_up.png);
    min-width:32px;
    min-height:32px;
    padding:2px 5px 0px 0px;
}
*/




QMenu {
background-color:#F0F0F0;
margin: 2px;
}


QMenu::item {
padding: 2px 12px 2px 12px;
}


QMenu::indicator {
width: 13px;
height: 13px;
}


QMenu::item:selected {
color: #FFFFFF;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QMenu::separator {
height: 1px;
background: #5CACEE;
}


QProgressBar {


/* border: 1px solid #5CACEE;*/
border-image: url(:/images/jindu.png); 
min-height:21px;
min-width:697px;
max-height:21px;
max-width:697px;
}


QProgressBar::chunk {
width: 4px; 
margin-right: 3px;
border-radius: 3px;
padding:0px;
background-color: #FFFFFF;
}


QSlider::groove:horizontal,QSlider::add-page:horizontal { 
background: #808080; 
height: 8px; 
border-radius: 3px; 
}


QSlider::sub-page:horizontal {
height: 8px; 
border-radius: 3px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QSlider::handle:horizontal {
width: 13px; 
margin-top: -3px; 
margin-bottom: -3px; 
border-radius: 6px;
background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,stop:0.6 #F0F0F0, stop:0.778409 #5CACEE);
}


QSlider::handle:horizontal:hover {
background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #1B89CA);
}


QSlider::groove:vertical,QSlider::sub-page:vertical {
background:#808080; 
width: 8px; 
border-radius: 3px;
}


QSlider::add-page:vertical {
width: 8px;
border-radius: 3px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QSlider::handle:vertical {
height: 14px; 
margin-left: -3px;
margin-right: -3px;
border-radius: 6px;
background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0, stop:0.778409 #5CACEE);
}


QSlider::handle:vertical:hover {
background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #1B89CA);
}


QScrollBar:vertical {
width:20px; 
background-color:rgba(255,255,255,255); 
padding-top:20px; 
padding-bottom:20px;
border: 1px solid rgba(201,201,201); 
}


QScrollBar:horizontal {
height:20px; 
background-color:rgba(255,255,255,255); 
padding-left:20px;
padding-right:20px;
border: 1px solid rgba(201,201,201); 


}


QScrollBar::handle:vertical {
width:20px;
background-color:rgba(231,231,231); 
border-top: 1px solid rgba(201,201,201); 
    border-bottom:1px solid rgba(201,201,201); 
}


QScrollBar::handle:horizontal {
height:20px;
background-color:rgba(231,231,231); 
border-left: 1px solid rgba(201,201,201); 
    border-right:1px solid rgba(201,201,201);
}
QScrollBar::handle:vertical:pressed {
width:20px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QScrollBar::handle:horizontal:pressed {
height:20px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}
/*
QScrollBar::handle:vertical:hover {
width:20px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QScrollBar::handle:horizontal:hover {
height:20px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}
*/
QScrollBar::add-line:vertical {
height:20px;
width:20px;
subcontrol-position: bottom; 
subcontrol-origin: margin;
image:url(:/images/add-line_vertical.png);


}


QScrollBar::add-line:horizontal {
height:20px;
width:20px;
subcontrol-position: right;
subcontrol-origin: margin;
image:url(:/images/add-line_horizontal.png);



}


QScrollBar::sub-line:vertical {
height:20px;
width:20px;
subcontrol-position: top; 
subcontrol-origin: margin;
image:url(:/images/sub-line_vertical.png);


}


QScrollBar::sub-line:horizontal {
height:20px;
width:20px;
subcontrol-position: left;
subcontrol-origin: margin;
image:url(:/images/sub-line_horizontal.png);


}


QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {
width:20px;
  border-top: 1px solid rgba(187,187,187); 
    border-bottom:1px solid rgba(187,187,187); 
background-color:rgba(255,255,255,255); 
}


QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
height:20px;
border-left: 1px solid rgba(187,187,187); 
    border-right:1px solid rgba(187,187,187);
background-color:rgba(255,255,255,255); 
}


QScrollArea {
border: 0px; 
}


QTreeView,QListView,QTableView{
border: 1px solid #e1e1e1;  
font: 16pt "PingFang SC";
font: regular;
border-radius:2px;
background-color:#ffffff;
alternate-background-color:#e9e9e9;
gridline-color:white;
color: rgb(85, 85, 85);
}


QTreeView::item:!alternate:!selected,QListView::item:!alternate:!selected,QTableView::item:!alternate:!selected{
background-color: #f5f5f5;
}


QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {


/* background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);  */
background-color:rgba(52,178,237); 
}


QTableView::item:hover, QListView::item:hover, QTreeView::item:hover {


/* background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);  */
background-color:rgba(52,178,237); 
}


QTableView::item, QListView::item, QTreeView::item,QTableWidget::item {
font: 16pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
border-left: 1px solid #ffffff;  
}


QHeaderView::section {
border: 1px solid #ffffff;  
background-color: #e1e1e1;
min-height:32px;
}
QHeaderView {
border: 0px solid #ffffff;  
background-color: #e1e1e1;
min-height:32px;
gridline-color:white;
color: rgb(85, 85, 85);
}
QTabWidget::pane{
    border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
border-top-left-radius:0px;
border-top-right-radius:10px;
background-color:rgba(52,178,237);
}
QTabWidget::tab-bar{
        alignment:left;
}
QTabBar::tab {
border-bottom-left-radius:10px;
border-bottom-right-radius:0px;
border-top-left-radius:10px;
border-top-right-radius:0px;
color: #F0F0F0;
min-width: 50px;
max-width: 50px;
min-height: 146px;
margin-right:5px;
margin-bottom:5px;
background:rgba(8,136,197);
font: 18pt "PingFang SC";
font: regular;
}


QTabBar::tab:selected{
background:rgba(52,178,237); 
margin-right:0px;
}




QStatusBar::item {
     border: 1px solid #5CACEE;
     border-radius: 3px;
}



你可能感兴趣的:(QT中一份用于项目的QSS样式,包括了多个控件)