测试.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<property name="styleSheet">
<string notr="true">
QComboBox QListView {
selection-background-color:white;
}
}</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>250</x>
<y>110</y>
<width>191</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{
background-color: rgb(52, 58, 64);
color: rgb(255, 255, 255);
}
QPushButton::hover{
/* background-color: rgb(90, 100, 111);*/
background-color: rgb(79, 87, 97);
}
QComboBox{
background-color: rgb(52, 58, 64);
border:1px;
border-color:(170, 170, 255);
color: rgb(255, 255, 255);
}
QLabel{
background-color: rgb(108, 99, 118);
margin-top: 5px;
border-bottom: 2px solid rgb(108, 99, 118);
border-top: 2px solid rgb(108, 99, 118);
}
QMainWindow{
background-color: rgb(244, 243, 248);
}
QComboBox::down-arrow
{
height: 15px;
width: 20px;
image: url(:/lol/arrow-up.png);
}
QWidget{
font: bold 15px;
font: Noto Sans;
color: rgb(255, 255, 255);
}
QCheckBox{
background-color: rgb(108, 99, 118);
margin-bottom: 5px;
}
QComboBox::drop-down {
border:none;
}
QComboBox::hover{
background-color: rgb(90, 100, 111);
}
QComboBox QListView {
background-color:rgb(52, 58, 64);
selection-background-color:rgb(121, 121, 182);
outline:none;
}
/* этот код не работает*\
QComboBox QScrollBar::handle:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
min-height: 0px
}
QComboBox QScrollBar::add-line:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
height: 0px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QComboBox QScrollBar::sub-line:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
height: 0 px;
subcontrol-position: top;
subcontrol-origin: margin;
}
/*и так тоже не работает*\
QScrollBar::handle:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
min-height: 0px
}
QScrollBar::add-line:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
height: 0px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop: 0 rgb(138, 147, 155), stop: 0.5 rgb(138, 147, 155), stop:1 rgb(138, 147, 155));
height: 0 px;
subcontrol-position: top;
subcontrol-origin: margin;
}</string>
</property>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
<item>
<property name="text">
<string>New Item</string>
</property>
</item>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>