一套简约的qt 蓝色qss方案
直接使用qss代码
QMenu
{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 rgba(255, 255, 255, 240),
stop:0.2 rgba(255, 255, 255, 200),
stop:0.6 rgba(255, 255, 255, 160),
stop:1 rgba(255, 255, 255, 120));
qproperty-effect: blur(30px);
border-radius: 10px;
padding:4px 2px;
margin:4px 2px;
}
QMenu::item
{
background-color: transparent;
padding:2px 15px;
margin:2px 2px;
height: 30px;
border-radius: 4px;
}
QMenu::item:selected
{
background-color: rgb(55,144,250);
}
QPushButton {
background-color: rgb(220,220,220);
border: 1px solid rgb(200,200,200);
border-radius: 10px;
min-height: 25px;
color: #000000;
padding:4px 20px;
margin:4px 4px;
}
QPushButton:hover {
background-color: rgb(55,144,250);
color: #ffffff;
}
QPushButton:pressed {
background-color: rgb(44,133,240);
color: #ffffff;
}
QPushButton:checked {
background-color: rgb(55,144,250);
color: #ffffff;
}
QPushButton:pressed:checked {
background-color: rgb(44,133,240);
color: #ffffff;
}
QSlider::groove:horizontal {
border: 1px solid #bbb;
background: white;
height: 8px;
margin: 2px 0;
border-radius: 4px;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc);
border: 1px solid #777;
width: 14px;
margin: -2px 0;
border-radius: 7px;
}
QSlider::handle:horizontal:hover {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #fff, stop:1 #ddd);
border: 1px solid #888;
}
QSlider::sub-page:horizontal {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #b9d6ff, stop:1 #add6ff);
border: 1px solid #999;
height: 8px;
border-radius: 4px;
}
QSlider::add-page:horizontal {
background: #f0f0f0;
border: 1px solid #999;
height: 8px;
border-radius: 4px;
}
QComboBox {
border-radius: 5px;
border: 1px solid #c0c0c0;
padding: 5px;
background-color: #f0f0f0;
}
QComboBox::drop-down {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-left: 1px solid #c0c0c0;
background-color: #f0f0f0;
}
QComboBox::down-arrow:on {
top: 1px;
left: 1px;
}
QComboBox::down-arrow:on {
top: 1px;
left: 1px;
}
QComboBox::item:selected {
background-color: rgb(55,144,250);
color: white;
padding-left:0px;
text-align: center;
border-radius: 5px;
}
QComboBox QAbstractItemView {
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
QLineEdit {
border: 1px solid #c0c0c0;
border-radius: 5px;
padding: 3px;
background-color: #f0f0f0;
selection-color: white;
selection-background-color: blue;
}
QLineEdit:focus {
border: 2px solid #0078d7;
}
QCheckBox::indicator {
width: 15px;
height: 15px;
}
QCheckBox {
spacing: 5px;
}
QCheckBox::indicator::unchecked {
border: 2px solid #c0c0c0;
border-radius: 5px;
}
QCheckBox::indicator::checked {
border: 2px solid #0078d7;
background-color: #0078d7;
border-radius: 5px;
}