本文开发语言:Python-PyQt5
效果图:
combobox_obj = QComboBox(objectName="comboboxObj")
combobox_obj.setStyleSheet("""
#comboboxObj{
background-color: rgb(178,200,187);
border: 1px solid rgb(200, 200, 200);
color: rgb(7,99,109);
font-weight: bold;
}
#comboboxObj QAbstractItemView::item{
height:20px;
}
#comboboxObj::drop-down{
border: 0px;
}
#comboboxObj::down-arrow{
image:url("combobox/more.png");
width: 15px;
height:15px;
}
""")
# 最后需设置一下listView
combobox_obj.setView(QListView())