QPushButton { background-color: red; border-style: outset; border-width: 2px; border-radius: 10px; border-color: beige; font: bold 14px; min-width: 10em; padding: 6px; } QPushButton:pressed { background-color: rgb(224, 0, 0); border-style: inset; } QPushButton:hover { background-color: yellow; } QPushButton:hover:pressed { background-color: green; } QPushButton::menu-indicator { image: url(:/toolbutton/Next.png); subcontrol-position: right center; subcontrol-origin: padding; left: -2px; } QRadioButton::indicator { width: 20px; height: 20px; } QRadioButton::indicator::unchecked { image: url(:/radio/status/radio_unchecked.png); } QRadioButton::indicator:unchecked:hover { image: url(:/radio/status/radio_unchecked_hover.png); } QRadioButton::indicator:unchecked:pressed { image: url(:/radio/status/radio_unchecked_pressed.png); } QRadioButton::indicator::checked { image: url(:/radio/status/radio_checked.png); } QRadioButton::indicator:checked:hover { image: url(:/radio/status/radio_checked_hover.png); } QRadioButton::indicator:checked:pressed { image: url(:/radio/status/radio_checked_pressed.png); } QCheckBox { spacing: 5px; } QCheckBox::indicator { width: 20px; height: 20px; } QCheckBox::indicator:unchecked:hover { image: url(:/checkbox/status/checkbox_unchecked_hover.png); } QCheckBox::indicator:unchecked:pressed { image: url(:/checkbox/status/checkbox_unchecked_pressed.png); } QCheckBox::indicator:checked:hover { image: url(:/checkbox/status/checkbox_checked_hover.png); } QCheckBox::indicator:checked:pressed { image: url(:/checkbox/status/checkbox_checked_pressed.png); } QCheckBox::indicator:indeterminate:hover { image: url(:/checkbox/status/checkbox_indeterminate_hover.png); } QCheckBox::indicator:indeterminate:pressed { image: url(:/checkbox/status/checkbox_indeterminate_pressed.png); } QComboBox { border: 1px solid gray; border-radius: 3px; padding: 1px 18px 1px 3px; min-width: 6em; } QComboBox:editable { background: white; } QComboBox:!editable, QComboBox::drop-down:editable { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); } /* 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 #D3D3D3, stop: 0.4 #D8D8D8, stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1); } 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: darkgray; 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(:/combobox/status/down_arrow_green.png); } QComboBox::down-arrow:on { /* shift the arrow when popup is open */ top: 1px; left: 1px; } QLineEdit { border: 2px solid gray; border-radius: 10px; padding: 0 8px; background: yellow; selection-background-color: darkgray; } QLineEdit[echoMode="2"] { lineedit-password-character: 9679; } QLineEdit:read-only { background: lightblue; } QTextEdit { background-color: white; background-image: url(:/textedit/status/draft.png); background-repeat: no-repeat; background-position: center; background-size: cover;/*无法适应组件大小*/ background-attachment: fixed; } QSpinBox { padding-right: 15px; /* make room for the arrows */ border-image: url(:/spinbox/status/frame.png) 4; border-width: 3; } QSpinBox::up-arrow { image: url(:/spinbox/status/up_arrow.png); width: 7px; height: 7px; } QSpinBox::down-arrow { image: url(:/spinbox/status/down_arrow.png); width: 7px; height: 7px; } QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off { /* off state when value is max */ image: url(:/spinbox/status/up_arrow_disabled.png); } QSpinBox::down-arrow:disabled, QSpinBox::down-arrow:off { /* off state when value in min */ image: url(:/spinbox/status/down_arrow_disabled.png); } QSpinBox::up-button:hover { border-image: url(:/spinbox/status/up_arrow_hover.png) 1; } QSpinBox::down-button:hover { border-image: url(:/spinbox/status/down_arrow_hover.png) 1; } QSpinBox::up-button:pressed { border-image: url(:/spinbox/status/up_arrow_disabled.png) 1; } QSpinBox::down-button:pressed { border-image: url(:/spinbox/status/down_arrow_disabled.png) 1; } QSlider::groove:horizontal { border: 1px solid #999999; height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4); margin: 2px 0; } QSlider::handle:horizontal { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); border: 1px solid #5c5c5c; width: 18px; margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */ border-radius: 3px; } QSlider::sub-page:horizontal { background: blue; } QSlider::add-page:horizontal { background: green; } QToolButton { /* all types of tool button */ border: 2px solid #8f8f91; border-radius: 6px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde); } QToolButton[popupMode="1"] { /* only for MenuButtonPopup */ padding-right: 20px; /* make way for the popup button */ } QToolButton:pressed { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa); } /* the subcontrols below are used only in the MenuButtonPopup mode */ QToolButton::menu-button { border: 2px solid gray; border-top-right-radius: 6px; border-bottom-right-radius: 6px; /* 16px width + 4px for border = 20px allocated above */ width: 16px; } QToolButton::menu-arrow { image: url(downarrow.png); } QToolButton::menu-arrow:open { top: 1px; left: 1px; /* shift it a bit */ } QProgressBar { border: 2px solid grey; border-radius: 5px; text-align: center; } QProgressBar::chunk { background-color: #CD96CD; width: 10px; margin: 0.5px; }