当前位置:   article > 正文

QT的QSS样式总结_qss 下划线

qss 下划线
  1. QLineEdit{
  2. background-color:rgb(51,51,51);
  3. border-radius: 7px;
  4. border:1px;
  5. border-style:outset;# 有边框
  6. boeder-color:Gray
  7. }
  8. background-color: rgba(255, 0, 0, 0.5);# 最后一位透明度
  9. 圆角窗体(有锯齿)
  10. QWidget{
  11. background-color:rgb(33,37,38);
  12. border-top-left-radius:15px;
  13. border-top-right-radius:15px;
  14. border-bottom-left-radius:15px;
  15. border-bottom-right-radius:15px;
  16. }
  17. button点击增加边框
  18. border: 1px solid #3C3C3C!important;
  19. border: 1px solid #3C3C3C!important;
  20. volumeSlider->setStyleSheet(" \
  21. QSlider\
  22. {\
  23. background-color: rgb(25, 38, 58);\
  24. min-width:5px;\
  25. max-width:5px;\
  26. border:15px solid rgb(25, 38, 58);\
  27. }\
  28. QSlider::add-page:vertical\
  29. { \
  30. background-color: rgb(37, 168, 198);\
  31. width:4px;\
  32. }\
  33. QSlider::sub-page:vertical \
  34. {\
  35. background-color: rgb(87, 97, 106);\
  36. width:4px;\
  37. }\
  38. QSlider::groove:vertical \
  39. {\
  40. background:transparent;\
  41. width:6px;\
  42. }\
  43. QSlider::handle:vertical \
  44. {\
  45. height: 13px;\
  46. width:13px;\
  47. border-image: url(:/images/ic_volume_thumb.png);\
  48. margin: -0 -4px; \
  49. }\
  50. ");
  51. QLabel 设置下划线 text-decoration:underline;
  52. 加背景图片
  53. background-image:url(E:\\Host\\images\\robot.png);
  54. 设置图片位置
  55. background-position:center;
  56. 图片重复吗?
  57. background-repeat:no-repeat;
  58. QComboBox {
  59. border: 1px solid gray;
  60. border-radius: 3px;
  61. padding: 1px 18px 1px 3px;
  62. min-width: 6em;
  63. }
  64. QComboBox:editable {
  65. background: white;
  66. }
  67. QComboBox:!editable, QComboBox::drop-down:editable {
  68. 设置渐变色
  69. background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
  70. stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
  71. stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
  72. }
  73. /* QComboBox gets the "on" state when the popup is open */
  74. QComboBox:!editable:on, QComboBox::drop-down:editable:on {
  75. background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
  76. stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
  77. stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
  78. }
  79. QComboBox:on { /* shift the text when the popup opens */
  80. padding-top: 3px;
  81. padding-left: 4px;
  82. }
  83. QComboBox::drop-down {
  84. subcontrol-origin: padding;
  85. subcontrol-position: top right;
  86. width: 15px;
  87. border-left-width: 1px;
  88. border-left-color: darkgray;
  89. border-left-style: solid; /* just a single line */
  90. border-top-right-radius: 3px; /* same radius as the QComboBox */
  91. border-bottom-right-radius: 3px;
  92. }
  93. QComboBox::down-arrow {
  94. image: url(/usr/share/icons/crystalsvg/16x16/actions/1downarrow.png);
  95. }
  96. QComboBox::down-arrow:on { /* shift the arrow when popup is open */
  97. top: 1px;
  98. left: 1px;
  99. }
  100. QComboBox{
  101. color:rgb(185,185,185);
  102. background-color:rgb(51,51,51);
  103. selection-background-color: rgb(51,51,51);
  104. border-radius: 7px;
  105. border:1px;
  106. padding-left:25px;
  107. }
  108. QComboBox::drop-down {
  109. subcontrol-origin: padding;
  110. subcontrol-position: top right;
  111. width: 30px;
  112. border-left-width: 0px;
  113. border-left-color: gray;
  114. border-left-style: solid;
  115. border-top-right-radius: 3px;
  116. border-bottom-right-radius: 3px;
  117. }
  118. QComboBox::down-arrow {
  119. image: url(E:/Host/images/ad.png);
  120. padding-right:5px;
  121. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/292643
推荐阅读
相关标签
  

闽ICP备14008679号