天天看點

QSS界面美化6

  1. .QWidget {  
  2.    background-color: beige;  
  3. }  
  4. QToolBar {  
  5.     background-color: beige;  
  6. }  
  7. QDialog, QFileDialog {  
  8.     background-color: beige;  
  9. }  
  10. QTabWidget::pane {   
  11.     border-top: 2px solid #C2C7CB;  
  12. }  
  13. QTabWidget::tab-bar {  
  14.     left: 5px;   
  15. }  
  16. QTabBar, QTabWidget {  
  17.     background-color: beige;  
  18. }  
  19. QTabBar::tab {  
  20.      background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,  
  21.                                  stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,  
  22.                                  stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);  
  23.      border: 1px solid darkkhaki;  
  24.      border-bottom-color: #C2C7CB;   
  25.      border-top-left-radius: 4px;  
  26.      border-top-right-radius: 4px;  
  27.      min-width: 8ex;  
  28.      padding: 2px;  
  29.  }  
  30. QTabBar::tab:selected, QTabBar::tab:hover {  
  31.     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,  
  32.                                 stop: 0 #fafafa, stop: 0.4 #f4f4f4,  
  33.                                 stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);  
  34. }  
  35. QTabBar::tab:selected {  
  36.     border-color: #9B9B9B;  
  37.     border-bottom-color: #C2C7CB;   
  38. }  
  39. QTabBar::tab:!selected {  
  40.     margin-top: 2px;   
  41. }  
  42. QLineEdit[echoMode="2"] {  
  43.     lineedit-password-character: 9679;  
  44. }  
  45. QHeaderView::section {  
  46.      background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,  
  47.                                        stop:0 #616161, stop: 0.5 #505050,  
  48.                                        stop: 0.6 #434343, stop:1 #656565);  
  49.      color: white;  
  50.      padding-left: 4px;  
  51.      border: 1px solid #6c6c6c;  
  52.  }  
  53.  QHeaderView::section:checked  
  54.  {  
  55.      background-color: red;  
  56.  }  
  57. QPushButton {  
  58.     background-color: palegoldenrod;  
  59.     border-width: 2px;  
  60.     border-color: darkkhaki;  
  61.     border-style: solid;  
  62.     border-radius: 5;  
  63.     padding: 3px;  
  64.     min-width: 9ex;  
  65.     min-height: 2.5ex;  
  66. }  
  67. QPushButton:hover {  
  68.    background-color: khaki;  
  69. }  
  70. QPushButton:pressed {  
  71.     padding-left: 5px;  
  72.     padding-top: 5px;  
  73.     background-color: #d0d67c;  
  74. }  
  75. QLabel, QAbstractButton {  
  76.     font: bold;  
  77. }  
  78. .mandatory {  
  79.     color: brown;  
  80. }  
  81. QStatusBar QLabel {  
  82.    font: normal;  
  83. }  
  84. QStatusBar::item {  
  85.     border-width: 1;  
  86.     border-color: darkkhaki;  
  87.     border-style: solid;  
  88.     border-radius: 2;  
  89. }  
  90. QStackedWidget, QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView, QWebView, QTreeView, QHeaderView {  
  91.     background-color: cornsilk;  
  92.     selection-color: #0a214c;   
  93.     selection-background-color: #C19A6B;  
  94. }  
  95. QListView {  
  96.     show-decoration-selected: 1;  
  97. }  
  98. QListView::item:hover {  
  99.     background-color: wheat;  
  100. }  
  101. QLineEdit, QFrame {  
  102.     border-width: 1px;  
  103.     padding: 1px;  
  104.     border-style: solid;  
  105.     border-color: darkkhaki;  
  106.     border-radius: 5px;  
  107. }  
  108. QLineEdit:focus, QFrame:focus {  
  109.     border-width: 3px;  
  110.     padding: 0px;  
  111. }  
  112. QLabel {  
  113.     border: none;  
  114.     padding: 0;  
  115.     background: none;  
  116. }  
  117. QToolTip {  
  118.     border: 2px solid darkkhaki;  
  119.     padding: 5px;  
  120.     border-radius: 3px;  
  121.     opacity: 200;  
  122. }  
  123. QRadioButton:hover, QCheckBox:hover {  
  124.     background-color: wheat;  
  125. }  
  126. QDialogButtonBox {  
  127.     button-layout: 0;  
  128. }  
qss

繼續閱讀