QSS界面美化5

  1. /* === Shared === */  
  2. QStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox,   
  3. QGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QTabBar {  
  4.     font-family"Segoe UI";  
  5.     background-color#888;  
  6.     color#000;  
  7. }  
  8.   
  9.   
  10. /* === QWidget === */  
  11. QWidget:window {  
  12.     font-family'Segoe UI';  
  13.     background-color#888;  
  14. }  
  15.   
  16.   
  17. /* === QPushButton === */  
  18. QPushButton {  
  19.     border1px solid #555;  
  20.     padding4px;  
  21.     min-width65px;  
  22.     min-height12px;  
  23. }  
  24.   
  25.   
  26. QPushButton:hover {  
  27.     background-color#999;  
  28. }  
  29.   
  30.   
  31. QPushButton:pressed {  
  32.     background-color#333;  
  33.     border-color#555;  
  34.     color#AAA;  
  35. }  
  36.   
  37.   
  38. QPushButton:disabled {  
  39.     color#333333;  
  40. }  
  41.   
  42.   
  43. /* === QComboBox === */  
  44. QComboBox {  
  45.     background-color#AAA;  
  46.     border1px solid #555;  
  47.     colorblack;  
  48. }  
  49.   
  50.   
  51. QComboBox::drop-down {  
  52.     subcontrol-origin: padding;  
  53.     subcontrol-positiontop right;  
  54.     border-left1px solid #333333;  
  55. }  
  56.   
  57.   
  58. /* === QGroupBox === */  
  59. QGroupBox {  
  60.     border1px solid #555;  
  61.     margin-top2ex;  
  62. }  
  63.   
  64.   
  65. QGroupBox::title {  
  66.     colorblack;  
  67.     subcontrol-origin: margin;  
  68.     subcontrol-positiontop left;      
  69.     border1px solid #555;  
  70. }  
  71.   
  72.   
  73. /* === QTabBar === */  
  74. QTabBar::tab {  
  75.     border-bottomnone;  
  76.     color#000;  
  77.     padding4px;  
  78.     background-color#888;  
  79.     border1px solid #555;  
  80. }  
  81.   
  82.   
  83. QTabBar::tab:hover {  
  84.     background-color#AAA;  
  85. }  
  86.   
  87.   
  88. QTabBar::tab:selected {  
  89.     background-color#000;  
  90.     colorwhite;  
  91. }  
  92.   
  93.   
  94. /* === QTabWidget === */  
  95. QTabWidget::pane {  
  96.     background#888;  
  97.     border1px solid #555;  
  98. }  
  99.   
  100.   
  101.   
  102.   
  103. /* === QToolBar === */  
  104. QToolBar {  
  105.     background#949494;  
  106.     bordernone;  
  107.     padding-left0px;  
  108.     padding-right0px;  
  109.     margin2px;  
  110. }  
  111.   
  112.   
  113. QToolBar::separator {  
  114.     width1px;  
  115.     margin-left3px;  
  116.     margin-right3px;  
  117.     background-color#555;  
  118. }  
  119.   
  120.   
  121. /* === QToolButton === */  
  122. QToolButton {  
  123.     border1px solid #666;  
  124.     margin1px;  
  125. }  
  126.   
  127.   
  128. QToolButton:hover {  
  129.     background-color#AAA;  
  130. }  
  131.   
  132.   
  133. QToolButton[popupMode="1"] { /* only for MenuButtonPopup */  
  134.     padding-right20px/* make way for the popup button */  
  135. }  
  136.   
  137.   
  138. QToolButton::menu-button {  
  139.     border-left1px solid #666;  
  140.     backgroundtransparent;  
  141.     width16px;  
  142. }  
  143.   
  144.   
  145. QToolButton::menu-button:hover {  
  146.     border-left1px solid #666;  
  147.     backgroundtransparent;  
  148.     width16px;  
  149. }  
  150.   
  151.   
  152. QToolButton:checked, QToolButton:pressed {  
  153.     background-color#000;  
  154.     border1px solid #555;  
  155.     colorwhite;  
  156. }  
  157.   
  158.   
  159. /* === QScrollBar:vertical === */  
  160. QScrollBar:vertical {  
  161.     width16px;  
  162.     margin16px 0 16px 0;  
  163.     background#333;  
  164. }  
  165.   
  166.   
  167. QScrollBar::handle:vertical {  
  168.     background#888;  
  169.     min-height16px;  
  170.     border-top1px solid #666;  
  171.     border-bottom1px solid #666;  
  172. }  
  173.   
  174.   
  175. QScrollBar::add-line:vertical {  
  176.     background#888;  
  177.     height16px;  
  178.     subcontrol-positionbottom;  
  179.     subcontrol-origin: margin;  
  180. }  
  181.   
  182.   
  183. QScrollBar::sub-line:vertical {  
  184.     background#888;  
  185.     height16px;  
  186.     subcontrol-positiontop;  
  187.     subcontrol-origin: margin;  
  188. }  
  189.   
  190.   
  191. QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {  
  192.     backgroundnone;  
  193. }  
  194.   
  195.   
  196. /* === QScrollBar:horizontal === */  
  197. QScrollBar:horizontal {  
  198.     height16px;  
  199.     margin0 16px 0 16px;  
  200.     background#333;  
  201. }  
  202.   
  203.   
  204. QScrollBar::handle:horizontal {  
  205.     background#888;  
  206.     min-width16px;  
  207.     border-left1px solid #666;  
  208.     border-right1px solid #666;  
  209. }  
  210.   
  211.   
  212. QScrollBar::add-line:horizontal {  
  213.     background#888;  
  214.     width16px;  
  215.     subcontrol-positionright;  
  216.     subcontrol-origin: margin;  
  217. }  
  218.   
  219.   
  220. QScrollBar::sub-line:horizontal {  
  221.     background#888;  
  222.     width16px;  
  223.     subcontrol-positionleft;  
  224.     subcontrol-origin: margin;  
  225. }  
  226.   
  227.   
  228. QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {  
  229.     backgroundnone;  
  230. }  
  231.   
  232.   
  233. /* === QMenu === */  
  234. QMenu {  
  235.     background-colorblack;  
  236.     border1px solid gray;  
  237.     colorwhite;  
  238.     padding1px;  
  239. }  
  240.   
  241.   
  242. QMenu::item {  
  243.     padding2px 25px 2px 20px;  
  244.     border1px solid transparent;  
  245. }  
  246.   
  247.   
  248. QMenu::item:disabled {  
  249.     color#666666;  
  250. }  
  251.   
  252.   
  253. QMenu::item:selected {  
  254.     border-colorgray;  
  255.     background#222222;  
  256. }  
  257.   
  258.   
  259. QMenu::icon:checked {  
  260.   
  261.   
  262. }  
  263.   
  264.   
  265. QMenu::separator {  
  266.     height1px;  
  267.     background#222222;  
  268.     margin-left10px;  
  269.     margin-right10px;  
  270.     margin-top1px;  
  271.     margin-bottom1px;  
  272. }  
  273.   
  274.   
  275. QMenu::indicator {  
  276.     width13px;  
  277.     height13px;  
  278. }  
  279.   
  280.   
  281. /* === QMenuBar === */  
  282. QMenuBar {  
  283.     background-colorblack;  
  284.     colorwhite;  
  285. }  
  286.   
  287.   
  288. QMenuBar::item {  
  289.     backgroundtransparent;  
  290. }  
  291.   
  292.   
  293. QMenuBar::item:disabled {  
  294.     colorgray;  
  295. }  
  296.   
  297.   
  298. QMenuBar::item:selected {  
  299.     background#222222;  
  300. }  
  301.   
  302.   
  303. QMenuBar::item:pressed {  
  304.     background#444444;  
  305. }  
  306. /* =================== */  
  307. QLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {  
  308.     background-color#AAA;  
  309.     color#000;  
  310.     border1px solid #555;  
  311. }  
  312.   
  313.   
  314. QAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {  
  315.     border1px solid #555;  
  316. }  
  317.   
  318.   
  319. /* === QHeaderView === */  
  320. QHeaderView::section {  
  321.     height20px;  
  322. }  
  323.   
  324.   
  325. QHeaderView::section {  
  326.     background#666;  
  327.     border0;  
  328.     color#000;  
  329.     padding-left4px;  
  330. }  
  331.   
  332.   
  333. /* === QListView === */  
  334. QListView::item:hover {  
  335.     background#AAA;  
  336. }  
  337.   
  338.   
  339. QListView::item:selected {  
  340.     background#333;  
  341.     color#AAA;  
  342. }  
  343.   
  344.   
  345. /* === QTableView === */  
  346. QTableView::item:hover {  
  347.     background#333333;  
  348. }  
  349.   
  350.   
  351. QTableView::item:hover {  
  352.     background#111111;  
  353.     color: yellow;  
  354. }  
  355.   
  356.   
  357. /* === QTreeView === */  
  358. QTreeView::item {  
  359.     background#AAA;  
  360. }  
  361.   
  362.   
  363. QTreeView::item:hover {  
  364.     background#CCC;  
  365. }  
  366.   
  367.   
  368. QTreeView::item:selected {  
  369.     background#333;  
  370.     color#AAA;  
  371. }  
  372.   
  373.   
  374. QTreeView::branch {  
  375.   
  376.   
  377. }  
  378.   
  379.   
  380. QTreeView::branch:has-siblings:adjoins-item {  
  381.   
  382.   
  383. }  
  384.   
  385.   
  386. QTreeView::branch:has-siblings:!adjoins-item {  
  387.   
  388.   
  389. }  
  390.   
  391.   
  392. QTreeView::branch:closed:has-children:has-siblings {  
  393.   
  394.   
  395. }  
  396.   
  397.   
  398. QTreeView::branch:has-children:!has-siblings:closed {  
  399.   
  400.   
  401. }  
  402.   
  403.   
  404. QTreeView::branch:!has-children:!has-siblings:adjoins-item {  
  405.   
  406.   
  407. }  
  408.   
  409.   
  410. QTreeView::branch:open:has-children:has-siblings {  
  411.   
  412.   
  413. }  
  414.   
  415.   
  416. QTreeView::branch:open:has-children:!has-siblings {  
  417.   
  418.   
  419. }  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值