|
- /*----------------------------------------------------------------------------在TreeWidget的标题颜色设置-------------------------------------------------------------------------------------------------------*/
- QHeaderView::section {
- background:transparent; /*控件背景透明*/
- border-color: #11505C; /*改变boder的颜色,以便实现动态感觉*/
- border-style: outset;
- border-width: 1px; /*boder的长度,有突出效果*/
- border-radius: 1px;
- padding: 5px; /*标题宽度*/
- }
- /*--------------------------------------------------------------以下为QLineEdit的设置----------------------------------------------------------*/
- QLineEdit,QTextEdit {
- border: 1px solid #32435E;
- border-radius: 5px; /*控件边框的弧度,数值越大,则弯曲得越厉害*/
- /* padding: 0 8px; */
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, /*背景*/
- stop: 0 #113845,
- stop: 1.0 #15A8FF);
- selection-background-color: #0A246A;
- }
- QLineEdit::hover{
- border-color:#5D8B9E; /*外边框的颜色*/
- }
- QLineEdit[echoMode="3"] {
- lineedit-password-character: 9679;
- }
- #QLineEdit:read-only {
- background: #543F7C;
- }
- /*-----------------------------------------------------------以下设置特定QToolButton的属性-----------------------------------------------------*/
- 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)
- }
- /*---------------------------------------------------------以下设置pushbutton的样式-------------------------------------------------*/
- QPushButton{
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, /*三个坐标对应的是上。中。下的background的颜色*/
- stop: 0 #122C39, stop: 0.5 #758385,
- stop: 1.0 #15A8FF);
- border-color: #11505C; /*改变boder的颜色,以便实现动态感觉*/
- border-style: outset;
- border-width: 5px; /*boder的长度,有突出效果*/
- border-radius: 1px;
- padding: 1px;
- }
- QPushButton::hover{
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
- stop: 0 #5B5F5F, stop: 0.5 #0C2436,
- stop: 1.0 #27405A);
- border-color: #11223F; /*boder的颜色,boder跟background做对比设置可以有较明显效果*/
-
- }
- 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;
- }
- QPushButton::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------------------------------------------------------*/
- QToolButton{
- min-width:30px;
- min-height:23px;
- }
- /*----------------------------------------------------------------以下设置QComboBox------------------------------------------------------*/
- QComboBox {
- min-width: 6em;
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, /*三个坐标对应的是上。中。下的background的颜色*/
- stop: 0 #122C39, stop: 0.5 #758385,
- stop: 1.0 #15A8FF);
- border-color: #11505C; /*改变boder的颜色,以便实现动态感觉*/
- border-style: outset;
- border-width: 5px; /*boder的长度,有突出效果*/
- border-radius: 1px;
- padding: 1px;
- }
- 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);
- }
- /*--------------------------------------------------设置QStatusBar---------------------------------------------------------------------------*/
- QStatusBar {
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, /*背景*/
- stop: 0 #113845,
- stop: 1.0 #15A8FF);
- }
- QStatusBar::item {
- border: 1px solid #3E58A5;
- border-radius: 3px;
- }
- #QStatusBar QLabel {
- border: 1px solid #6AF0FF;
- /*background: white; */
- }
复制代码 |
|