PyQt5QComboBox样式
self.cb =QComboBox(self)
self.cb.setStyleSheet('''QComboBox::down-arrow {image:url(./images/Calendar_img.png);padding-left:15px;}                QComboBox QAbstractItemView::item { min-height:34px;}
QComboBox::drop-down {border:0px solid gray;width:40px;}
QComboBox{border:1px solid white;font-size:13px;}
''')
self.cb.setView(QListView())
self.cb.setMaximumWidth(140)
self.cb.setMinimumHeight(34)
self.cb.addItems(['2021-01-18 早班','2021-01-18 晚班','2021-01-19 早班','2021-01-19 晚班'])
间距修改 min-height⼤⼩
borderboxQComboBox QAbstractItemView::item {min-height: 34px;}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。