PyQt样式表设置QComboBox
selfboBox_marital = QComboBox(self)
mar_list_view = QListView()
selfboBox_marital.setView(mar_list_view)
selfboBox_marital.addItem("已婚")
selfboBox_marital.addItem("未婚")
selfboBox_marital.setStyleSheet("""
QComboBox{font-family:Microsoft YaHei;border:1px;border-color#252525:border-radius:2px;background:
#404040;font:12px;color:white;height: 20px;}
QComboBox:editable{background:black;}
QComboBox QAbstractItemView{border: 0px;outline:0px;selection-background-color: blue;height:100px;background: rgb(1,58,80);color:white;font-size:12px}
QComboBox QAbstractItemView::item {height:30px;}
QComboBox QAbstractItemView::item:selected{background-color: blue;}
QComboBox::down-arrow{image:url(application/resources/icons/combo_arrow.png);}
QComboBox::drop-down{border:0px;}
""")borderbox
selfboBox_marital.setCurrentIndex(-1)
下拉箭头:
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论