QSS界面美化6

  1. .QWidget {  
  2.    background-color: beige;  
  3. }  
  4.   
  5. QToolBar {  
  6.     background-color: beige;  
  7. }  
  8.   
  9. QDialog, QFileDialog {  
  10.     background-color: beige;  
  11. }  
  12.   
  13. QTabWidget::pane { /* The tab widget frame */  
  14.     border-top2px solid #C2C7CB;  
  15. }  
  16.   
  17. QTabWidget::tab-bar {  
  18.     left: 5px/* move to the right by 5px */  
  19. }  
  20.   
  21. QTabBar, QTabWidget {  
  22.     background-color: beige;  
  23. }  
  24. QTabBar::tab {  
  25.      background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,  
  26.                                  stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,  
  27.                                  stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);  
  28.      border1px solid darkkhaki;  
  29.      border-bottom-color#C2C7CB/* same as the pane color */  
  30.      border-top-left-radius: 4px;  
  31.      border-top-right-radius: 4px;  
  32.      min-width8ex;  
  33.      padding2px;  
  34.  }  
  35. QTabBar::tab:selected, QTabBar::tab:hover {  
  36.     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,  
  37.                                 stop: 0 #fafafa, stop: 0.4 #f4f4f4,  
  38.                                 stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);  
  39. }  
  40.   
  41. QTabBar::tab:selected {  
  42.     border-color#9B9B9B;  
  43.     border-bottom-color#C2C7CB/* same as pane color */  
  44. }  
  45.   
  46. QTabBar::tab:!selected {  
  47.     margin-top2px/* make non-selected tabs look smaller */  
  48. }  
  49.   
  50. /* Nice Windows-XP-style password character. */  
  51. QLineEdit[echoMode="2"] {  
  52.     lineedit-password-character: 9679;  
  53. }  
  54.   
  55. QHeaderView::section {  
  56.      background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,  
  57.                                        stop:0 #616161, stop: 0.5 #505050,  
  58.                                        stop: 0.6 #434343, stop:1 #656565);  
  59.      colorwhite;  
  60.      padding-left4px;  
  61.      border1px solid #6c6c6c;  
  62.  }  
  63.   
  64.  QHeaderView::section:checked  
  65.  {  
  66.      background-colorred;  
  67.  }  
  68.   
  69.   
  70. /* We provide a min-width and min-height for push buttons 
  71.    so that they look elegant regardless of the width of the text. */  
  72. QPushButton {  
  73.     background-color: palegoldenrod;  
  74.     border-width2px;  
  75.     border-color: darkkhaki;  
  76.     border-stylesolid;  
  77.     border-radius: 5;  
  78.     padding3px;  
  79.     min-width9ex;  
  80.     min-height2.5ex;  
  81. }  
  82.   
  83. QPushButton:hover {  
  84.    background-color: khaki;  
  85. }  
  86.   
  87. /* Increase the padding, so the text is shifted when the button is 
  88.    pressed. */  
  89. QPushButton:pressed {  
  90.     padding-left5px;  
  91.     padding-top5px;  
  92.     background-color#d0d67c;  
  93. }  
  94.   
  95. QLabel, QAbstractButton {  
  96.     fontbold;  
  97. }  
  98.   
  99. /* Mark mandatory fields with a brownish color. */  
  100. .mandatory {  
  101.     color: brown;  
  102. }  
  103.   
  104. /* Bold text on status bar looks awful. */  
  105. QStatusBar QLabel {  
  106.    fontnormal;  
  107. }  
  108.   
  109. QStatusBar::item {  
  110.     border-width1;  
  111.     border-color: darkkhaki;  
  112.     border-stylesolid;  
  113.     border-radius: 2;  
  114. }  
  115.   
  116. QStackedWidget, QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView, QWebView, QTreeView, QHeaderView {  
  117.     background-color: cornsilk;  
  118.     selection-color#0a214c;   
  119.     selection-background-color#C19A6B;  
  120. }  
  121.   
  122. QListView {  
  123.     show-decoration-selected: 1;  
  124. }  
  125.   
  126. QListView::item:hover {  
  127.     background-color: wheat;  
  128. }  
  129.   
  130. /* We reserve 1 pixel space in padding. When we get the focus, 
  131.    we kill the padding and enlarge the border. This makes the items 
  132.    glow. */  
  133. QLineEdit, QFrame {  
  134.     border-width1px;  
  135.     padding1px;  
  136.     border-stylesolid;  
  137.     border-color: darkkhaki;  
  138.     border-radius: 5px;  
  139. }  
  140.   
  141. /* As mentioned above, eliminate the padding and increase the border. */  
  142. QLineEdit:focus, QFrame:focus {  
  143.     border-width3px;  
  144.     padding0px;  
  145. }  
  146.   
  147. /* A QLabel is a QFrame  */  
  148. QLabel {  
  149.     bordernone;  
  150.     padding0;  
  151.     backgroundnone;  
  152. }  
  153.   
  154. /* A QToolTip is a QLabel  */  
  155. QToolTip {  
  156.     border2px solid darkkhaki;  
  157.     padding5px;  
  158.     border-radius: 3px;  
  159.     opacity: 200;  
  160. }  
  161.   
  162. /* Nice to have the background color change when hovered. */  
  163. QRadioButton:hover, QCheckBox:hover {  
  164.     background-color: wheat;  
  165. }  
  166.   
  167. /* Force the dialog's buttons to follow the Windows guidelines. */  
  168. QDialogButtonBox {  
  169.     button-layout: 0;  
  170. }  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值