QT样式美化 之 qss入门

news2024/11/15 17:51:38
样例一


*{
  font-size:13px;
  color:white;
  font-family:"宋体";
}

CallWidget QLineEdit#telEdt
{
  font-size:24px;

}

QMainWindow,QDialog{
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1B2534, stop: 0.4 #010101,
                                 stop: 0.5 #000101, stop: 1.0 #1F2B3C);
}
QWidget{
    background:#121922;
}

QLabel{
   background:transparent;
}

QFrame{
    border-color:#32435E;
    border-width:1px;
    border-radius: 3px;
}


DailForm QLineEdit#phoneLineEdt{
  font-size:36px;
  font-weight: bold;
}

QPushButton,QToolButton{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #5B5F5F, stop: 0.5 #0C2436,
                                 stop: 1.0 #27405A);
    border-style: outset;
    border-width: 1px;
    border-radius: 5px;
    border-color: #11223F;
    padding: 1px;
}

QPushButton::hover,QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QPushButton::pressed,QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QPushButton::disabled,QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}



QDialog QPushButton,QDialog QToolButton{
  min-width:30px;
  min-height:23px;
}

QToolButton[objectName="minimizeToolBtn"] {
    background: transparent;
    border:none;
    image:url(qss/minimize.png)
}
QToolButton[objectName="minimizeToolBtn"]:hover,QToolButton[objectName="minimizeToolBtn"]:pressed {
    image:url(qss/minimize_hover.png)
}
QToolButton[objectName="maximizeToolBtn"] {
    background: transparent;
    border:none;
    image:url(qss/maximize.png)
}
QToolButton[objectName="maximizeToolBtn"]:hover,QToolButton[objectName="maximizeToolBtn"]:pressed {
    image:url(qss/maximize_hover.png)
}

QToolButton[objectName="closeToolBtn"],QToolButton[objectName="customCloseWindow"] {
    background: transparent;
    border:none;
    image:url(qss/close.png)
}
QToolButton[objectName="closeToolBtn"]:hover,QToolButton[objectName="closeToolBtn"]:pressed{
    image:url(qss/close_hover.png)
}
QToolButton[objectName="customCloseWindow"]:hover,QToolButton[objectName="customCloseWindow"]:pressed{
    image:url(qss/close_hover.png)
}
QToolButton[objectName="titleSetUpToolBtn"]{
    background: transparent;
    border:none;
    image:url(qss/setup.png)
}


DailForm QToolButton#oneToolBtn,QToolButton#OneToolBtn,QToolButton#twoToolBtn,QToolButton#threeToolBtn,
         QToolButton#fourToolBtn,QToolButton#fiveToolBtn,QToolButton#sixToolBtn,
         QToolButton#sevenToolBtn,QToolButton#eightToolBtn,QToolButton#nineToolBtn,
         QToolButton#starToolBtn,QToolButton#zeroToolBtn,QToolButton#sharpToolBtn {
    font-size:36px;
    border-radius: 10px;

}
DailForm QToolButton#delToolBtn{
    border-radius: 10px;

}






QLineEdit,QTextEdit {
    border: 1px solid #32435E;
    border-radius: 3px;
    /* padding: 0 8px; */
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
    selection-background-color: #0A246A;

}
QLineEdit::hover{
  border-color:#5D8B9E;
}

QLineEdit[echoMode="3"] {
     lineedit-password-character: 9679;
}

#QLineEdit:read-only {
     background: #543F7C;
}


QTabWidget::pane { /* The tab widget frame */
     border: 0px solid #32435E;
     position: absolute;
     left: -0.1em;

 }

QTabWidget#MainTabWidget::tab-bar {
     left: -3px; /* move to the right by 5px */
 }

QTabWidget#MainTabWidget QTabBar::tab {
     height: 14ex;
     width: 14ex;

 }



 QTabBar::tab {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #292F31, stop: 1 #0C131E);
 }
QTabBar::tab:selected{
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #113845,  stop: 1.0 #15A8FF);
 }
QTabBar::tab:hover {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #113845,  stop: 1.0 #0E6F80);
 }

 #QTabBar::tab:selected {
     border-color: #32435E;
     border-right-color: #32435E; /* same as pane color */
 }

 #QTabBar::tab:!selected {
     margin-left: 2px; /* make non-selected tabs look smaller */
 }
#QTabBar:tab:first:selected {
    margin-top: 0;
}
QTabBar:tab:last:selected {
    margin-right: 0;
}
QTabBar:tab:only-one {
     margin: 0;
}

QListWidget{
    border: 1px solid #32435E;
    background:#050609;
}


QListWidget::item:selected {
     /*border: 0px solid #33CCFF;*/
     border:none;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #6A848C,  stop: 1.0 #0F9EAF);
     padding:0px;
     margin:0px;
}

#QListWidget::item:selected:!active {
     border-width: 0px ;
 }
#QListWidget::item:selected:active {
     border-width: 1px;
 }




QComboBox {
     border: 1px solid #32435E;
     border-radius: 3px;
     padding: 1px 18px 1px 3px;
     min-width: 6em;
 }
QComboBox::hover{
  border-color:#5D8B9E;
}


 QComboBox:editable {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
 }

 QComboBox:!editable, QComboBox::drop-down:editable {
      background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
 }

 /* QComboBox gets the "on" state when the popup is open */
 QComboBox:!editable:on, QComboBox::drop-down:editable:on {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);;
 }

 QComboBox:on { /* shift the text when the popup opens */
     padding-top: 3px;
     padding-left: 4px;
 }
 QComboBox::drop-down {
     subcontrol-origin: padding;
     subcontrol-position: top right;
     width: 15px;

     border-left-width: 1px;
     border-left-color: 32435E;
     border-left-style: solid; /* just a single line */
     border-top-right-radius: 3px; /* same radius as the QComboBox */
     border-bottom-right-radius: 3px;
 }

 QComboBox::down-arrow {
     image: url(qss/downarrow.png);
 }

 QComboBox::down-arrow:on { /* shift the arrow when popup is open */
     top: 1px;
     left: 1px;
 }

 QComboBox QAbstractItemView {
     border: 2px solid #32435E;
     selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #506B79,
                                 stop: 1.0 #0D95A6);
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1B2534, stop: 0.4 #010101,
                                 stop: 0.5 #000101, stop: 1.0 #1F2B3C);
 }





QCheckBox {
     spacing: 5px;
 }

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

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

 QCheckBox::indicator:unchecked:hover {
     image: url(qss/checkbox_unchecked_hover.png);
 }

 QCheckBox::indicator:unchecked:pressed {
     image: url(qss/checkbox_unchecked_pressed.png);
 }

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

 QCheckBox::indicator:checked:hover {
     image: url(qss/checkbox_checked_hover.png);
 }

 QCheckBox::indicator:checked:pressed {
     image: url(qss/checkbox_checked_pressed.png);
 }

 QCheckBox::indicator:indeterminate:hover {
     image: url(qss/checkbox_indeterminate_hover.png);
 }

 QCheckBox::indicator:indeterminate:pressed {
     image: url(qss/checkbox_indeterminate_pressed.png);
 }





  QMenu {
     background-color: #030406;
     border-width:0px;
     margin: 2px;
 }

 QMenu::item {
     background-color: #1D2838;
     padding: 2px 25px 2px 20px;
     border-color:transparent;
     color:#858E94;
 }
 QMenu::item:!enabled {
     background-color:  #1D2838;
     padding: 2px 25px 2px 20px;
     border-color:transparent;
     color:#76746C;
 }

 QMenu::item:selected {
     border-width:1px;
     border-color: #516589;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1E293A,
                                 stop: 1.0 #2C547E);
     color:#E6FFFF;
 }

 QMenu::icon:checked { /* appearance of a 'checked' icon */
     background: gray;
     border: 1px inset gray;
     position: absolute;
     top: 1px;
     right: 1px;
     bottom: 1px;
     left: 1px;
 }

 QMenu::separator {
     height: 1px;
     background: #1D99A9;
     /*margin-left: 10px;*/
     /*margin-right: 5px;*/
 }

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

 /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
 QMenu::indicator:non-exclusive:unchecked {
     image: url(qss/checkbox_unchecked.png);
 }

 QMenu::indicator:non-exclusive:unchecked:selected {
     image: url(qss/checkbox_unchecked_hover.png);
 }

 QMenu::indicator:non-exclusive:checked {
     image: url(qss/checkbox_checked.png);
 }

 QMenu::indicator:non-exclusive:checked:selected {
     image: url(qss/checkbox_checked_hover.png);
 }

 /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
 QMenu::indicator:exclusive:unchecked {
     image: url(qss/radiobutton_unchecked.png);
 }

 QMenu::indicator:exclusive:unchecked:selected {
     image: url(qss/radiobutton_unchecked_hover.png);
 }

 QMenu::indicator:exclusive:checked {
     image: url(qss/radiobutton_checked.png);
 }

 QMenu::indicator:exclusive:checked:selected {
     image: url(qss/radiobutton_checked_hover.png);
 }

  QMenuBar {
     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #121722, stop:1 #121722);
 }

 QMenuBar::item {
     spacing: 3px; /* spacing between menu bar items */
     padding: 1px 4px;
     background: #10151E;
     border-radius: 4px;
     font:#BBDDFF;
 }

 QMenuBar::item:selected { /* when selected using mouse or keyboard */
     background: #1A2432;
     font:#FFFFFF;
 }

 QMenuBar::item:pressed {
     background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #10151E, stop:1 #2C547E);
     font:#FFFFFF;

 }
 QMenuBar::item:hover{
    border-width:1px;
    border-color:#516589;
    background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #9979A, stop:1 #2D567F);
    font:#FFFFFF;

 }

QListView{
    border: 1px solid #32435E;
    background:#050609;
}



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

 QRadioButton::indicator::unchecked {
     image: url(qss/radiobutton_unchecked.png);
 }

 QRadioButton::indicator:unchecked:hover {
     image: url(qss/radiobutton_unchecked_hover.png);
 }

 QRadioButton::indicator:unchecked:pressed {
     image: url(qss/radiobutton_unchecked_pressed.png);
 }

 QRadioButton::indicator::checked {
     image: url(qss/radiobutton_checked.png);
 }

 QRadioButton::indicator:checked:hover {
     image: url(qss/radiobutton_checked_hover.png);
 }

 QRadioButton::indicator:checked:pressed {
     image: url(qss/radiobutton_checked_pressed.png);
 }


 QGroupBox {
     border: 1px solid #2E3D57;
     border-radius: 5px;
     margin-top: 1ex; /* leave space at the top for the title */
 }

 QGroupBox::title {
     subcontrol-origin: margin;
     subcontrol-position: top left;
     padding: 0 3px;
     background-color: transparent;
 }

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

 QGroupBox::indicator:unchecked {
     image: url(qss/checkbox_unchecked.png);
 }
QGroupBox::indicator:checked {
     image: url(qss/checkbox_checked.png);
}

QScrollBar:vertical {
      border: 1px solid #32435E;
      border-width: 0px 0px 0px 1px;
      background: #21252F;
      width: 12px;
      margin: 12px 0 12px 0;
  }
  QScrollBar::handle:vertical {
      background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #60788C, stop:1 #1084BD);
      min-height: 20px;
  }
  QScrollBar::add-line:vertical {
      border: 1px solid #32435E;
      border-width:0px 0px 0px 1px;
      background:#21252F;
      height: 12px;
      subcontrol-position: bottom;
      subcontrol-origin: margin;
  }

  QScrollBar::sub-line:vertical {
      border: 1px solid #32435E;
      border-width:0px 0px 0px 1px;
      background: #21252F;
      height: 12px;
      subcontrol-position: top;
      subcontrol-origin: margin;
  }
  QScrollBar::up-arrow:vertical {
      border: 1px solid transparent;
      background: #21252F;
      image: url(qss/up_arrow.png);
      width: 7px;
      height: 7px;
  }
  QScrollBar::up-arrow:vertical:hover,QScrollBar::up-arrow:vertical:pressed {
      image: url(qss/up_arrow_hover.png);
  }

  QScrollBar::down-arrow:vertical{
      border: 1px solid transparent;
      background: #21252F;
      image:url(qss/down_arrow.png);
      width: 7px;
      height: 7px;
  }
QScrollBar::down-arrow:vertical:hover,QScrollBar::down-arrow:vertical:pressed{
    image: url(qss/down_arrow_hover.png);
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      background: none;
}


 QScrollBar:horizontal {
      border: 1px solid #32435E;
      border-width: 1px 0px 0px 0px;
      background: #21252F;
      height: 12px;
      margin: 0 12px 0 12px;
  }
  QScrollBar::handle:horizontal {
      background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #60788C, stop:1 #1084BD);
      min-width: 20px;
  }
  QScrollBar::add-line:horizontal {
      border: 1px solid #32435E;
      border-width:1px 0px 0px 0px;
      background:#21252F;
      width: 12px;
      subcontrol-position: right;
      subcontrol-origin: margin;
  }

  QScrollBar::sub-line:horizontal {
      border: 1px solid #32435E;
      border-width:1px 0px 0px 0px;
      background: #21252F;
      width: 12px;
      subcontrol-position: left;
      subcontrol-origin: margin;
  }
  QScrollBar::left-arrow:horizontal {
      border: 1px solid transparent;
      background: #21252F;
      image: url(qss/left_arrow.png);
      width: 7px;
      height: 7px;
  }
  QScrollBar::left-arrow:horizontal:hover,QScrollBar::left-arrow:horizontal:pressed {
      image: url(qss/left_arrow_hover.png);
  }

  QScrollBar::right-arrow:horizontal{
      border: 1px solid transparent;
      background: #21252F;
      image:url(qss/right_arrow.png);
      width: 7px;
      height: 7px;
  }
QScrollBar::right-arrow:horizontal:hover,QScrollBar::right-arrow:horizontal:pressed{
    image: url(qss/right_arrow_hover.png);
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
      background: none;
}








QSpinBox,QDateTimeEdit {
     border: 1px solid #32435E;
     border-radius: 3px;
     padding-right: 5px; /* make room for the arrows */
     /* border-image: url(qss/frame.png) 4; */
     background:qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #080B10, stop:1 #212C3F);
 }
 QSpinBox::hover,QDateTimeEdit::hover{
    border-color:#5D8B9E;
 }

 QSpinBox::up-button, QDateTimeEdit::up-button {
     subcontrol-origin: border;
     subcontrol-position: top right; /* position at the top right corner */

     width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
     border-image: url(qss/spinup.png) 1;
     border-width: 1px;


 }

 QSpinBox::up-button:hover,QDateTimeEdit::up-button:hover {
     border-image: url(qss/spinup_hover.png) 1;
 }

 QSpinBox::up-button:pressed,QDateTimeEdit::up-button:pressed {
     border-image: url(qss/spinup_pressed.png) 1;
 }

 QSpinBox::up-arrow,QDateTimeEdit::up-arrow {
     image: url(qss/up_arrow.png);
     width: 7px;
     height: 7px;
 }

 QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off,QDateTimeEdit::up-arrow:disabled,QDateTimeEdit::up-arrow:off { /* off state when value is max */
    image: url(qss/up_arrow_disabled.png);
 }

 QSpinBox::down-button,QDateTimeEdit::down-button {
     subcontrol-origin: border;
     subcontrol-position: bottom right; /* position at bottom right corner */

     width: 16px;
     border-image: url(qss/spindown.png) 1;
     border-width: 1px;
     border-top-width: 0;
 }

 QSpinBox::down-button:hover,QDateTimeEdit::down-button:hover {
     border-image: url(qss/spindown_hover.png) 1;
 }

 QSpinBox::down-button:pressed,QDateTimeEdit::down-button:pressed {
     border-image: url(qss/spindown_pressed.png) 1;
 }

 QSpinBox::down-arrow,QDateTimeEdit::down-arrow {
     image: url(qss/down_arrow.png);
     width: 7px;
     height: 7px;
 }

 QSpinBox::down-arrow:disabled,QDateTimeEdit::down-arrow:disabled,
 QSpinBox::down-arrow:off,QDateTimeEdit::down-arrow:off { /* off state when value in min */
    image: url(qss/down_arrow_disabled.png);
 }




  QToolTip {
     border: 1.5px solid #179BAB;
     padding: 3px;
     border-radius: 8px;
     opacity: 200; /*透明度*/
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #0C1016,
                                 stop: 1.0 #233043);
 }

 QStatusBar {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #07090E,
                                 stop: 1.0 #202C3D);
 }

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

#QStatusBar QLabel {
     border: 1px solid #6AF0FF;
     /*background: white; */
}


QSizeGrip { /*在MainWindow右下角*/
     image: url(qss/sizegrip.png);
     width: 16px;
     height: 16px;
 }



 QHeaderView::section {
     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #353B43, stop:1 #151A20);
     color: white;
     padding-left: 4px;
     border: 1px solid #447684;
 }

 /* style the sort indicator */
 QHeaderView::down-arrow {
     image: url(qss/down_arrow.png);
 }

 QHeaderView::up-arrow {
     image: url(qss/up_arrow.png);
 }
 QTableView {
     selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,
                                 stop: 0 #516A78, stop: 1 #10A9BA);

     gridline-color:#447684;
 }



QTreeWidget{
    background:#18202E;
    border-style: outset;
    border-width: 0px;
    border-color: #11223F;
    padding: 1px;
}

QTreeWidget::branch:has-siblings:!adjoins-item {
     border-image: url(qss/vline.png) 0;
 }

 QTreeWidget::branch:has-siblings:adjoins-item {
     border-image: url(qss/branch-more.png) 0;
 }

 QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {
     border-image: url(qss/branch-end.png) 0;
 }

 QTreeWidget::branch:has-children:!has-siblings:closed,
 QTreeWidget::branch:closed:has-children:has-siblings {
         border-image: none;
         image: url(qss/branch-closed.png);
 }

 QTreeWidget::branch:open:has-children:!has-siblings,
 QTreeWidget::branch:open:has-children:has-siblings  {
         border-image: none;
         image: url(qss/branch-open.png);
 }


 QTreeWidget::item {
      border: 1px solid #d9d9d9;
      border-color: transparent;
 }
  QTreeWidget::item:hover {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #598892, stop: 1 #189BAB);
     border: 1px solid #bfcde4;
 }

QTreeWidget::item:selected {
     /*border: 0px solid #33CCFF;*/
     border:none;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #6A848C,  stop: 1.0 #0F9EAF);
     padding:0px;
     margin:0px;
}

QFrame#customTitleBar{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #454F53,  stop: 1.0 #135263);
}


QWidget#TranslucentWidget *
{
    background-color: rgba( 255, 255, 255, 100 );
}

QWidget#TranslucentWidget QFrame#frame
{
    border-radius: 5px;
}

QWidget#TranslucentWidget QPushButton {

    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #5B5F5F, stop: 0.5 #0C2436,
                                 stop: 1.0 #27405A);
    background-color: rgba( 255, 255, 255, 100 );
}

QWidget#TranslucentWidget QPushButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#TranslucentWidget QPushButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}



QWidget#GroupChatingWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}

QWidget#GroupChatingWidget QLabel
{
    background: transparent;
}

QWidget#GroupChatingWidget QFrame#mainFrame
{
    border-radius: 5px;
}



QWidget#GroupChatingWidget QPushButton::hover,QWidget#GroupChatingWidget QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#GroupChatingWidget QPushButton::pressed,QWidget#GroupChatingWidget QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QWidget#GroupChatingWidget QPushButton::disabled,QWidget#GroupChatingWidget QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}


QWidget#UserListWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}

QWidget#GroupChatinSingleWidget *
{
    background-color: rgba( 93, 93, 93, 60 );
    color:#000080;
}
QWidget#GroupChatinSingleWidget QLabel
{
    background: transparent;
}
QWidget#GroupChatingWidget QPushButton::hover,QWidget#GroupChatingWidget QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#GroupChatingWidget QPushButton::pressed,QWidget#GroupChatingWidget QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QWidget#GroupChatingWidget QPushButton::disabled,QWidget#GroupChatingWidget QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}

QWidget#InfoAreaWidget *
{
    background-color: rgba( 93, 93, 93, 100 );
    color:#000080;
    font: 75 12pt "宋体";
}

QWidget#InfoAreaWidget QLabel
{
    background: transparent;
}

QWidget#GpsLeftBottomWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}


QWidget#GpsSysMenuWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}

QWidget#GpsRigthBottomWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}



QWidget#GpsRightTopWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}

QWidget#VideoImageWidget QFrame#topFrame,QWidget#VideoImageWidget QFrame#bottomFrame{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #454F53,  stop: 1.0 #135263);
}


QWidget#NavItemMenuWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#000080;
}
QWidget#NavItemMenuWidget QLabel
{
    background: transparent;
}

样例二


*{
  font-size:13px;
  color:white;
  font-family:"宋体";
}

CallWidget QLineEdit#telEdt
{
  font-size:24px;

}

QMainWindow,QDialog{
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1B2534, stop: 0.4 #010101,
                                 stop: 0.5 #000101, stop: 1.0 #1F2B3C);
}
QWidget{
    background:#121922;
}

QLabel{
   background:transparent;
}

QFrame{
    border-color:#32435E;
    border-width:1px;
    border-radius: 3px;
}


DailForm QLineEdit#phoneLineEdt{
  font-size:36px;
  font-weight: bold;
}

QPushButton,QToolButton{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #5B5F5F, stop: 0.5 #0C2436,
                                 stop: 1.0 #27405A);
    border-style: outset;
    border-width: 1px;
    border-radius: 5px;
    border-color: #11223F;
    padding: 1px;
}

QPushButton::hover,QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QPushButton::pressed,QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QPushButton::disabled,QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}



QDialog QPushButton,QDialog QToolButton{
  min-width:30px;
  min-height:23px;
}

QToolButton[objectName="minimizeToolBtn"] {
    background: transparent;
    border:none;
    image:url(qss/minimize.png)
}
QToolButton[objectName="minimizeToolBtn"]:hover,QToolButton[objectName="minimizeToolBtn"]:pressed {
    image:url(qss/minimize_hover.png)
}
QToolButton[objectName="maximizeToolBtn"] {
    background: transparent;
    border:none;
    image:url(qss/maximize.png)
}
QToolButton[objectName="maximizeToolBtn"]:hover,QToolButton[objectName="maximizeToolBtn"]:pressed {
    image:url(qss/maximize_hover.png)
}

QToolButton[objectName="closeToolBtn"],QToolButton[objectName="customCloseWindow"] {
    background: transparent;
    border:none;
    image:url(qss/close.png)
}
QToolButton[objectName="closeToolBtn"]:hover,QToolButton[objectName="closeToolBtn"]:pressed{
    image:url(qss/close_hover.png)
}
QToolButton[objectName="customCloseWindow"]:hover,QToolButton[objectName="customCloseWindow"]:pressed{
    image:url(qss/close_hover.png)
}
QToolButton[objectName="titleSetUpToolBtn"]{
    background: transparent;
    border:none;
    image:url(qss/setup.png)
}


DailForm QToolButton#oneToolBtn,QToolButton#OneToolBtn,QToolButton#twoToolBtn,QToolButton#threeToolBtn,
         QToolButton#fourToolBtn,QToolButton#fiveToolBtn,QToolButton#sixToolBtn,
         QToolButton#sevenToolBtn,QToolButton#eightToolBtn,QToolButton#nineToolBtn,
         QToolButton#starToolBtn,QToolButton#zeroToolBtn,QToolButton#sharpToolBtn {
    font-size:36px;
    border-radius: 10px;

}
DailForm QToolButton#delToolBtn{
    border-radius: 10px;

}






QLineEdit,QTextEdit {
    border: 1px solid #32435E;
    border-radius: 3px;
    /* padding: 0 8px; */
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
    selection-background-color: #0A246A;

}
QLineEdit::hover{
  border-color:#5D8B9E;
}

QLineEdit[echoMode="3"] {
     lineedit-password-character: 9679;
}

#QLineEdit:read-only {
     background: #543F7C;
}


QTabWidget::pane { /* The tab widget frame */
     border: 0px solid #32435E;
     position: absolute;
     left: -0.1em;

 }

QTabWidget#MainTabWidget::tab-bar {
     left: -3px; /* move to the right by 5px */
 }

QTabWidget#MainTabWidget QTabBar::tab {
     height: 14ex;
     width: 14ex;

 }



 QTabBar::tab {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #292F31, stop: 1 #0C131E);
 }
QTabBar::tab:selected{
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #113845,  stop: 1.0 #15A8FF);
 }
QTabBar::tab:hover {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #113845,  stop: 1.0 #0E6F80);
 }

 #QTabBar::tab:selected {
     border-color: #32435E;
     border-right-color: #32435E; /* same as pane color */
 }

 #QTabBar::tab:!selected {
     margin-left: 2px; /* make non-selected tabs look smaller */
 }
#QTabBar:tab:first:selected {
    margin-top: 0;
}
QTabBar:tab:last:selected {
    margin-right: 0;
}
QTabBar:tab:only-one {
     margin: 0;
}

QListWidget{
    border: 1px solid #32435E;
    background:#050609;
}


QListWidget::item:selected {
     /*border: 0px solid #33CCFF;*/
     border:none;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #6A848C,  stop: 1.0 #0F9EAF);
     padding:0px;
     margin:0px;
}

#QListWidget::item:selected:!active {
     border-width: 0px ;
 }
#QListWidget::item:selected:active {
     border-width: 1px;
 }




QComboBox {
     border: 1px solid #32435E;
     border-radius: 3px;
     padding: 1px 18px 1px 3px;
     min-width: 6em;
 }
QComboBox::hover{
  border-color:#5D8B9E;
}


 QComboBox:editable {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
 }

 QComboBox:!editable, QComboBox::drop-down:editable {
      background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);
 }

 /* QComboBox gets the "on" state when the popup is open */
 QComboBox:!editable:on, QComboBox::drop-down:editable:on {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #080B10,
                                 stop: 1.0 #212C3F);;
 }

 QComboBox:on { /* shift the text when the popup opens */
     padding-top: 3px;
     padding-left: 4px;
 }
 QComboBox::drop-down {
     subcontrol-origin: padding;
     subcontrol-position: top right;
     width: 15px;

     border-left-width: 1px;
     border-left-color: 32435E;
     border-left-style: solid; /* just a single line */
     border-top-right-radius: 3px; /* same radius as the QComboBox */
     border-bottom-right-radius: 3px;
 }

 QComboBox::down-arrow {
     image: url(qss/downarrow.png);
 }

 QComboBox::down-arrow:on { /* shift the arrow when popup is open */
     top: 1px;
     left: 1px;
 }

 QComboBox QAbstractItemView {
     border: 2px solid #32435E;
     selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #506B79,
                                 stop: 1.0 #0D95A6);
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1B2534, stop: 0.4 #010101,
                                 stop: 0.5 #000101, stop: 1.0 #1F2B3C);
 }





QCheckBox {
     spacing: 5px;
 }

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

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

 QCheckBox::indicator:unchecked:hover {
     image: url(qss/checkbox_unchecked_hover.png);
 }

 QCheckBox::indicator:unchecked:pressed {
     image: url(qss/checkbox_unchecked_pressed.png);
 }

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

 QCheckBox::indicator:checked:hover {
     image: url(qss/checkbox_checked_hover.png);
 }

 QCheckBox::indicator:checked:pressed {
     image: url(qss/checkbox_checked_pressed.png);
 }

 QCheckBox::indicator:indeterminate:hover {
     image: url(qss/checkbox_indeterminate_hover.png);
 }

 QCheckBox::indicator:indeterminate:pressed {
     image: url(qss/checkbox_indeterminate_pressed.png);
 }





  QMenu {
     background-color: #030406;
     border-width:0px;
     margin: 2px;
 }

 QMenu::item {
     background-color: #1D2838;
     padding: 2px 25px 2px 20px;
     border-color:transparent;
     color:#858E94;
 }
 QMenu::item:!enabled {
     background-color:  #1D2838;
     padding: 2px 25px 2px 20px;
     border-color:transparent;
     color:#76746C;
 }

 QMenu::item:selected {
     border-width:1px;
     border-color: #516589;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #1E293A,
                                 stop: 1.0 #2C547E);
     color:#E6FFFF;
 }

 QMenu::icon:checked { /* appearance of a 'checked' icon */
     background: gray;
     border: 1px inset gray;
     position: absolute;
     top: 1px;
     right: 1px;
     bottom: 1px;
     left: 1px;
 }

 QMenu::separator {
     height: 1px;
     background: #1D99A9;
     /*margin-left: 10px;*/
     /*margin-right: 5px;*/
 }

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

 /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
 QMenu::indicator:non-exclusive:unchecked {
     image: url(qss/checkbox_unchecked.png);
 }

 QMenu::indicator:non-exclusive:unchecked:selected {
     image: url(qss/checkbox_unchecked_hover.png);
 }

 QMenu::indicator:non-exclusive:checked {
     image: url(qss/checkbox_checked.png);
 }

 QMenu::indicator:non-exclusive:checked:selected {
     image: url(qss/checkbox_checked_hover.png);
 }

 /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
 QMenu::indicator:exclusive:unchecked {
     image: url(qss/radiobutton_unchecked.png);
 }

 QMenu::indicator:exclusive:unchecked:selected {
     image: url(qss/radiobutton_unchecked_hover.png);
 }

 QMenu::indicator:exclusive:checked {
     image: url(qss/radiobutton_checked.png);
 }

 QMenu::indicator:exclusive:checked:selected {
     image: url(qss/radiobutton_checked_hover.png);
 }

  QMenuBar {
     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #121722, stop:1 #121722);
 }

 QMenuBar::item {
     spacing: 3px; /* spacing between menu bar items */
     padding: 1px 4px;
     background: #10151E;
     border-radius: 4px;
     font:#BBDDFF;
 }

 QMenuBar::item:selected { /* when selected using mouse or keyboard */
     background: #1A2432;
     font:#FFFFFF;
 }

 QMenuBar::item:pressed {
     background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #10151E, stop:1 #2C547E);
     font:#FFFFFF;

 }
 QMenuBar::item:hover{
    border-width:1px;
    border-color:#516589;
    background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #9979A, stop:1 #2D567F);
    font:#FFFFFF;

 }

QListView{
    border: 1px solid #32435E;
    background:#050609;
}



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

 QRadioButton::indicator::unchecked {
     image: url(qss/radiobutton_unchecked.png);
 }

 QRadioButton::indicator:unchecked:hover {
     image: url(qss/radiobutton_unchecked_hover.png);
 }

 QRadioButton::indicator:unchecked:pressed {
     image: url(qss/radiobutton_unchecked_pressed.png);
 }

 QRadioButton::indicator::checked {
     image: url(qss/radiobutton_checked.png);
 }

 QRadioButton::indicator:checked:hover {
     image: url(qss/radiobutton_checked_hover.png);
 }

 QRadioButton::indicator:checked:pressed {
     image: url(qss/radiobutton_checked_pressed.png);
 }


 QGroupBox {
     border: 1px solid #2E3D57;
     border-radius: 5px;
     margin-top: 1ex; /* leave space at the top for the title */
 }

 QGroupBox::title {
     subcontrol-origin: margin;
     subcontrol-position: top left;
     padding: 0 3px;
     background-color: transparent;
 }

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

 QGroupBox::indicator:unchecked {
     image: url(qss/checkbox_unchecked.png);
 }
QGroupBox::indicator:checked {
     image: url(qss/checkbox_checked.png);
}

QScrollBar:vertical {
      border: 1px solid #32435E;
      border-width: 0px 0px 0px 1px;
      background: #21252F;
      width: 12px;
      margin: 12px 0 12px 0;
  }
  QScrollBar::handle:vertical {
      background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #60788C, stop:1 #1084BD);
      min-height: 20px;
  }
  QScrollBar::add-line:vertical {
      border: 1px solid #32435E;
      border-width:0px 0px 0px 1px;
      background:#21252F;
      height: 12px;
      subcontrol-position: bottom;
      subcontrol-origin: margin;
  }

  QScrollBar::sub-line:vertical {
      border: 1px solid #32435E;
      border-width:0px 0px 0px 1px;
      background: #21252F;
      height: 12px;
      subcontrol-position: top;
      subcontrol-origin: margin;
  }
  QScrollBar::up-arrow:vertical {
      border: 1px solid transparent;
      background: #21252F;
      image: url(qss/up_arrow.png);
      width: 7px;
      height: 7px;
  }
  QScrollBar::up-arrow:vertical:hover,QScrollBar::up-arrow:vertical:pressed {
      image: url(qss/up_arrow_hover.png);
  }

  QScrollBar::down-arrow:vertical{
      border: 1px solid transparent;
      background: #21252F;
      image:url(qss/down_arrow.png);
      width: 7px;
      height: 7px;
  }
QScrollBar::down-arrow:vertical:hover,QScrollBar::down-arrow:vertical:pressed{
    image: url(qss/down_arrow_hover.png);
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      background: none;
}


 QScrollBar:horizontal {
      border: 1px solid #32435E;
      border-width: 1px 0px 0px 0px;
      background: #21252F;
      height: 12px;
      margin: 0 12px 0 12px;
  }
  QScrollBar::handle:horizontal {
      background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #60788C, stop:1 #1084BD);
      min-width: 20px;
  }
  QScrollBar::add-line:horizontal {
      border: 1px solid #32435E;
      border-width:1px 0px 0px 0px;
      background:#21252F;
      width: 12px;
      subcontrol-position: right;
      subcontrol-origin: margin;
  }

  QScrollBar::sub-line:horizontal {
      border: 1px solid #32435E;
      border-width:1px 0px 0px 0px;
      background: #21252F;
      width: 12px;
      subcontrol-position: left;
      subcontrol-origin: margin;
  }
  QScrollBar::left-arrow:horizontal {
      border: 1px solid transparent;
      background: #21252F;
      image: url(qss/left_arrow.png);
      width: 7px;
      height: 7px;
  }
  QScrollBar::left-arrow:horizontal:hover,QScrollBar::left-arrow:horizontal:pressed {
      image: url(qss/left_arrow_hover.png);
  }

  QScrollBar::right-arrow:horizontal{
      border: 1px solid transparent;
      background: #21252F;
      image:url(qss/right_arrow.png);
      width: 7px;
      height: 7px;
  }
QScrollBar::right-arrow:horizontal:hover,QScrollBar::right-arrow:horizontal:pressed{
    image: url(qss/right_arrow_hover.png);
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
      background: none;
}








QSpinBox,QDateTimeEdit {
     border: 1px solid #32435E;
     border-radius: 3px;
     padding-right: 5px; /* make room for the arrows */
     /* border-image: url(qss/frame.png) 4; */
     background:qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #080B10, stop:1 #212C3F);
 }
 QSpinBox::hover,QDateTimeEdit::hover{
    border-color:#5D8B9E;
 }

 QSpinBox::up-button, QDateTimeEdit::up-button {
     subcontrol-origin: border;
     subcontrol-position: top right; /* position at the top right corner */

     width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
     border-image: url(qss/spinup.png) 1;
     border-width: 1px;


 }

 QSpinBox::up-button:hover,QDateTimeEdit::up-button:hover {
     border-image: url(qss/spinup_hover.png) 1;
 }

 QSpinBox::up-button:pressed,QDateTimeEdit::up-button:pressed {
     border-image: url(qss/spinup_pressed.png) 1;
 }

 QSpinBox::up-arrow,QDateTimeEdit::up-arrow {
     image: url(qss/up_arrow.png);
     width: 7px;
     height: 7px;
 }

 QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off,QDateTimeEdit::up-arrow:disabled,QDateTimeEdit::up-arrow:off { /* off state when value is max */
    image: url(qss/up_arrow_disabled.png);
 }

 QSpinBox::down-button,QDateTimeEdit::down-button {
     subcontrol-origin: border;
     subcontrol-position: bottom right; /* position at bottom right corner */

     width: 16px;
     border-image: url(qss/spindown.png) 1;
     border-width: 1px;
     border-top-width: 0;
 }

 QSpinBox::down-button:hover,QDateTimeEdit::down-button:hover {
     border-image: url(qss/spindown_hover.png) 1;
 }

 QSpinBox::down-button:pressed,QDateTimeEdit::down-button:pressed {
     border-image: url(qss/spindown_pressed.png) 1;
 }

 QSpinBox::down-arrow,QDateTimeEdit::down-arrow {
     image: url(qss/down_arrow.png);
     width: 7px;
     height: 7px;
 }

 QSpinBox::down-arrow:disabled,QDateTimeEdit::down-arrow:disabled,
 QSpinBox::down-arrow:off,QDateTimeEdit::down-arrow:off { /* off state when value in min */
    image: url(qss/down_arrow_disabled.png);
 }




  QToolTip {
     border: 1.5px solid #179BAB;
     padding: 3px;
     border-radius: 8px;
     opacity: 200; /*透明度*/
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #0C1016,
                                 stop: 1.0 #233043);
 }

 QStatusBar {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #07090E,
                                 stop: 1.0 #202C3D);
 }

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

#QStatusBar QLabel {
     border: 1px solid #6AF0FF;
     /*background: white; */
}


QSizeGrip { /*在MainWindow右下角*/
     image: url(qss/sizegrip.png);
     width: 16px;
     height: 16px;
 }



 QHeaderView::section {
     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #353B43, stop:1 #151A20);
     color: white;
     padding-left: 4px;
     border: 1px solid #447684;
 }

 /* style the sort indicator */
 QHeaderView::down-arrow {
     image: url(qss/down_arrow.png);
 }

 QHeaderView::up-arrow {
     image: url(qss/up_arrow.png);
 }
 QTableView {
     selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,
                                 stop: 0 #516A78, stop: 1 #10A9BA);

     gridline-color:#447684;
 }



QTreeWidget{
    background:#18202E;
    border-style: outset;
    border-width: 0px;
    border-color: #11223F;
    padding: 1px;
}

QTreeWidget::branch:has-siblings:!adjoins-item {
     border-image: url(qss/vline.png) 0;
 }

 QTreeWidget::branch:has-siblings:adjoins-item {
     border-image: url(qss/branch-more.png) 0;
 }

 QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {
     border-image: url(qss/branch-end.png) 0;
 }

 QTreeWidget::branch:has-children:!has-siblings:closed,
 QTreeWidget::branch:closed:has-children:has-siblings {
         border-image: none;
         image: url(qss/branch-closed.png);
 }

 QTreeWidget::branch:open:has-children:!has-siblings,
 QTreeWidget::branch:open:has-children:has-siblings  {
         border-image: none;
         image: url(qss/branch-open.png);
 }


 QTreeWidget::item {
      border: 1px solid #d9d9d9;
      border-color: transparent;
 }
  QTreeWidget::item:hover {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #598892, stop: 1 #189BAB);
     border: 1px solid #bfcde4;
 }

QTreeWidget::item:selected {
     /*border: 0px solid #33CCFF;*/
     border:none;
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #6A848C,  stop: 1.0 #0F9EAF);
     padding:0px;
     margin:0px;
}

QFrame#customTitleBar{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #454F53,  stop: 1.0 #135263);
}


QWidget#TranslucentWidget *
{
    background-color: rgba( 255, 255, 255, 100 );
}

QWidget#TranslucentWidget QFrame#frame
{
    border-radius: 5px;
}

QWidget#TranslucentWidget QPushButton {

    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #5B5F5F, stop: 0.5 #0C2436,
                                 stop: 1.0 #27405A);
    background-color: rgba( 255, 255, 255, 100 );
}

QWidget#TranslucentWidget QPushButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#TranslucentWidget QPushButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}



QWidget#GroupChatingWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}

QWidget#GroupChatingWidget QLabel
{
    background: transparent;
}

QWidget#GroupChatingWidget QFrame#mainFrame
{
    border-radius: 5px;
}



QWidget#GroupChatingWidget QPushButton::hover,QWidget#GroupChatingWidget QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#GroupChatingWidget QPushButton::pressed,QWidget#GroupChatingWidget QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QWidget#GroupChatingWidget QPushButton::disabled,QWidget#GroupChatingWidget QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}


QWidget#UserListWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}

QWidget#GroupChatinSingleWidget *
{
    background-color: rgba( 93, 93, 93, 60 );
    color:#FFFFFF;
}
QWidget#GroupChatinSingleWidget QLabel
{
    background: transparent;
}
QWidget#GroupChatingWidget QPushButton::hover,QWidget#GroupChatingWidget QToolButton::hover{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #758385, stop: 0.5 #122C39,
                                 stop: 1.0 #0E7788);
    border-color: #11505C;
}

QWidget#GroupChatingWidget QPushButton::pressed,QWidget#GroupChatingWidget QToolButton::pressed{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #969B9C, stop: 0.5 #16354B,
                                 stop: 1.0 #244F76);
    border-color: #11505C;
}
QWidget#GroupChatingWidget QPushButton::disabled,QWidget#GroupChatingWidget QToolButton::disabled{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #282B2C, stop: 0.5 #09121A,
                                 stop: 1.0 #111D29);
    border-color: #0A1320;
    color:#6A6864;

}

QWidget#InfoAreaWidget *
{
    background-color: rgba( 93, 93, 93, 100 );
    color:#FFFFFF;
    font: 75 12pt "宋体";
}

QWidget#InfoAreaWidget QLabel
{
    background: transparent;
}

QWidget#GpsLeftBottomWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}


QWidget#GpsSysMenuWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}

QWidget#GpsRigthBottomWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}



QWidget#GpsRightTopWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}

QWidget#VideoImageWidget QFrame#topFrame,QWidget#VideoImageWidget QFrame#bottomFrame{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #454F53,  stop: 1.0 #135263);
}


QWidget#NavItemMenuWidget *
{
    background-color: rgba( 93, 93, 93, 30 );
    color:#FFFFFF;
}
QWidget#NavItemMenuWidget QLabel
{
    background: transparent;
}

 字体样式
* {
	font-family: 宋体;
	font-size: 12px;

}


QPushButton {
    background-color: yellowgreen;
    border-width: 2px;
    border-color: seagreen;
    border-style: solid;
    border-radius: 5;
    padding: 3px;
    min-width: 9ex;
    min-height: 2.5ex;
}

QPushButton:hover {
   background-color: springgreen;
}

QPushButton:pressed {
    padding-left: 5px;
    padding-top: 5px;
    background-color: palegreen;
}



QLabel {
	font:bold;
	font-family: 宋体;
	font-size: 12px;

}

DailForm>QToolButton#OneToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#twoToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#threeToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#fourToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#fiveToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#sixToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#sevenToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#eightToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#nineToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#zeroToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#starToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#sharpToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 40px;
}
DailForm>QToolButton#delToolBtn {
  font: bold;
  font-family: 宋体;
  font-size: 30px;
}

QComboBox, QSpinBox {
    background-color: plum;					/*  暗紫色 */
    selection-color: mediumvioletred;
    selection-background-color: lightcoral;
}

QRadioButton:checked {
	color:deepskyblue;
}

QRadioButton:hover {
	color:white;
    background-color: limegreen;
}

QGroupBox {
	border-style:dashed;
}


QTabBar::tab {
  height: 14ex;
  width: 14ex;
}

 表格样式

QTableWidget#CloudBackupUploadBottomTabWidget{
	background: #FFFFFF;	
}
QHeaderView#CloudBackupUploadBottomTabWidget                   
{
    background:transparent;   
	border: 1px solid #619AFF;	
}
QHeaderView#CloudBackupUploadBottomTabWidget::section           
{
    font-size: 14px;                
    font-family: "PingFangSC-Regular"; 
    color: #667289;
 
    background: transparent;           
    border: none;                  
    min-height: 40px;              
    max-height: 40px;              
    margin-left: 0px;               
    padding-left: 0px;   
	border-bottom: 1px solid rgb(255,0,0);       
}
QSplitter#CloudBackupUploadBottomTabWidget{
    background: transparent;  	
}

CloudBackupUploadBottomTabWidget::section::first
//难点在去除tab头的分割线
演示效果 

 参考

 GitHub - 15th/qmlStyle: qt qml样式

 https://www.cnblogs.com/findumars/category/624955.html

Qss样式集合(持续更新)_qss通用样式下载-CSDN博客 

GitHub - ColinDuquesnoy/QDarkStyleSheet: A dark style sheet for QtWidgets application

 Qt QTableWidget 样式表_qtablewidget样式-CSDN博客

Qt之QTreeView的样式 · 语雀 


创作不易,小小的支持一下吧!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1940028.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【LeetCode】day17:654 - 最大二叉树, 617 - 合并二叉树, 700 - 二叉树搜索树中的搜索, 98 - 验证二叉搜索树

LeetCode 代码随想录跟练 Day17 654.最大二叉树617.合并二叉树700.二叉搜索树中的搜索98.验证二叉搜索树 654.最大二叉树 题目描述: 给定一个不重复的整数数组 nums 。 最大二叉树 可以用下面的算法从 nums 递归地构建: 创建一个根节点,其值为 nums 中的…

PyCharm创建一个空的python项目

1.设置项目路径 2.配置python解释器 右下角可以选择always

提交(git-add git-commit git-push)

当修改好一个功能的时候,可以提交到远程仓库,这样就等于更新了一次版本,那么下次改修了文件的话,是跟这个版本做对比的 git status, 查看文件修改情况,git add 假如你只想提交1个文件,那么直接…

Python入门基础教程(非常详细)

现在找工作真的越来越难了!今年更是难上加难 前几天在网上刷到这样一条热搜: #23岁找工作因年龄大被HR拒绝了# 是这个世界疯了还是我疯了? 合着只想要有20年以上工作经验的应届毕业生是吧 这好像就是现在的就业市场现状:“35岁…

【leetcode】二分查找本质

标题:【leetcode】二分查找本质 水墨不写bug 正文开始:(点击题目标题转跳到OJ) 目录 (O)前言* (一) 在排序数组中查找元素的第一个和最后一个位置 思路详解: 参考代…

cocos2d-x安装和项目

首先多方查找资料发现教程很简洁,发现对自己的操作方面没多大帮助,后来干脆去官网,好像也很简洁。基于这样一个原因,加上我首次碰cocos2d-x,决定记录一下整个流程,解决实际操作上的疑惑。 涉及的方面&…

数模·时间序列

时间序列思维导图 时间序列分析的方法 聚焦于趋势和季节变化 时间序列预测模型 时间序列平稳性 时间序列的平稳性是时间序列分析中的一个重要概念。一个时间序列如果是平稳的,意味着其统计性质(如均值、方差、自相关等)不随时间变化。 平稳性…

[计网04] 传输层和应用层 笔记 总结 万字详解

目录 传输层概述和功能 URL 和URI 端口号划分 套接字Socket UDP(User Datagram Protocol) UDP首部 UDP伪首部 TCP 三报文握手和四报文挥手 TCP(Transmission Control Protocol) TCP首部报文格式 TCP流量控制 cwnd&…

如何在 C# ASP.NET MVC 项目中实现 Memcached?

一.介绍 在现代 Web 应用程序中,性能和可扩展性至关重要。提高性能的有效方法之一是使用缓存。Memcached 是一种开源、高性能、分布式内存缓存系统,被广泛使用。本文将引导您在 C# ASP.NET MVC 项目中实现 Memcached。 二.什么是 Memcached?…

SpringBoot面试高频总结01

1. 什么是SpringBoot? SpringBoot是一个基于Spring框架的快速开发框架,它采用约定大于配置,自动装配的方式,可以快速地创建独立的,生产级别的,基于Spring的应用程序。 相比于传统的Spring框架,S…

真实测评,霍尼韦尔、希喂、352宠物空气净化器性能对比

在快节奏的社会生活中,人们越来越注重精神需要,许多年轻人纷纷选择拥抱宠物,作为生活中的温馨伴侣。宠物们治愈心灵的同时也要付出一定“代价”,日常养护,如清理猫毛、管理气味以及保持宠物环境的清洁,都是…

Agent类型解析:AIGC在不同领域的应用与影响

目录 引言 垂直智能体(Vertical Agent) 水平智能体(Horizontal Agent) 混合智能体(Hybrid Agent) 结论 引言 在人工智能(AI)领域,智能体(Agent&#xf…

更加深入Mysql-04-MySQL 多表查询与事务的操作

文章目录 多表查询内连接隐式内连接显示内连接 外连接左外连接右外连接 子查询 事务事务隔离级别 多表查询 有时我们不仅需要一个表的数据,数据可能关联到俩个表或者三个表,这时我们就要进行夺标查询了。 数据准备: 创建一个部门表并且插入…

JavaWeb day01-HTML入门

Web前端 课程安排 HTML、CSS简介 HTML快速入门 实现标题排版 新闻标题样式

Docker核心技术:Docker的基本使用

云原生学习路线导航页(持续更新中) 本文是 Docker核心技术 系列文章:Docker的基本使用,其他文章快捷链接如下: 应用架构演进容器技术要解决哪些问题Docker的基本使用(本文)Docker是如何实现的 3…

Spark调优特殊case- Task倾斜

首先我们观察下上面的stage5, Task MaxTime2.4Min, 但是stage5的整体耗时竟然可以达到55Min, 其实分区1000, 300个executor, 按照最大的TaskTime2.4Min来估算所有Task运行完成时间, 那么时间应该是- 2.4Min * 3 2.4Min 9.6Min 也就是最慢也就跑10分钟就…

【时时三省】(C语言基础)函数和数组

山不在高,有仙则名。水不在深,有龙则灵。 ——csdn时时三省 函数 跟数学里面的函数很相似 数组 一组相同类型的元素的集合 比如把5个整形1-5存起来 int arr[10]={1,2,3&#x…

StyleGAN——定制人脸生成思路

定制人脸生成思路 控制生成码 ( Z ) 的分布范围:适合粗略控制生成图像的主要特征(如性别、人种、年龄),方法简单但精度较低。特定维度特征的替换:适用于细致控制图像的特征(如皮肤颜色、发型)&…

贪吃蛇超精讲(C语言)

前言 如果你还是个萌新小白,那么该项目的攻克过程一定会十分艰难。虽然作者已经将文章尽可能写的逻辑清晰,内容详细。但所谓“纸上得来终觉浅”,在讲到陌生结构和函数时,大家请一定自己动手去敲一遍代码,这很重要&…

Opencv学习项目3——人脸识别

之前我们获取了一张图像的人脸信息,现在我们来使用特征点分析来匹配两张lyf照片的相似度 获取两张图片的人脸信息 import cv2 import face_recognition# 加载图像文件 img1 face_recognition.load_image_file(lyf1.png) img2 face_recognition.load_image_file(l…