![](/img/trans.png)
[英]PyQt: display QPushButton that looks like the down-arrow button in QComboBox
[英]How to remove the border of a QComboBox down-arrow in PySide2 of PyQt5?
我设置了 QComboBox 的深色背景,QComboBox 在向下箭头处显示一个边框,
self.storeComboBox.setStyleSheet("QComboBox { background: #262739; border-radius: 5px;}" }
QComboBox::drop-down
{
border: 0px; /* also tried border:none */
}
我尝试了很多方法,但都行不通,不知道为什么?
这对我有用,但删除了箭头图标,看起来按钮消失了,因此您可以设置背景颜色以确认它仍然存在。
QComboBox::drop-down:button{border-radius:5px; background:rgb(0,0,0)}
您可以使用此设置自定义按钮图标,
QComboBox::down-arrow{image: url(./down.png)}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.