-
Notifications
You must be signed in to change notification settings - Fork 364
/
mainwindow.ui
124 lines (124 loc) · 2.71 KB
/
mainwindow.ui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?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>229</width>
<height>181</height>
</rect>
</property>
<property name="windowTitle">
<string>MyComboBox</string>
</property>
<property name="styleSheet">
<string notr="true">/*下拉框*/
QComboBox{
min-width:1px;
min-height:26px;
padding-left: 5px;
padding-right: 2px;
color: white;
border:1px solid rgb(128, 128, 128);
background-color: rgb(100 ,100 ,100);
}
QComboBox:on{
/*弹出为on*/
}
QComboBox:hover{
border:1px solid rgb(255, 170, 0);
}
QComboBox:disabled{
color: rgb(230, 230, 230);
background-color:rgb(150, 150, 150);
}
QComboBox:editable{
background-color:rgb(100, 100, 100);
}
QComboBox:editable:disabled{
background-color:rgb(150, 150, 150);
}
/*下拉按钮-配合贴图*/
QComboBox::drop-down{
min-width:24px;
}
/*下拉框弹出项*/
QComboBox QAbstractItemView{
font: 15px "宋体";
background-color:rgb(110, 110, 110);
}
QComboBox QAbstractItemView::item{
height:24px;
color:white;
}
QComboBox QAbstractItemView::item:hover{
background-color: rgb(255, 170, 0);
}
QComboBox QAbstractItemView::item:selected{
background-color: rgb(255, 170, 0);
}
/*按钮样式*/
QComboBox QAbstractItemView QPushButton{
max-width:40px;
min-width:40px;
max-height:20px;
min-height:20px;
border-radius:2px;
border:0;
margin-right:20px;
background-color:white;
}
QComboBox QAbstractItemView QPushButton:hover{
background-color:cyan;
}</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Click the item button to remove it.</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxA"/>
</item>
<item>
<widget class="MyComboBox" name="comboBoxB"/>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>229</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>MyComboBox</class>
<extends>QComboBox</extends>
<header>MyComboBox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>