![](/img/trans.png)
[英]change Pandas Row background colour and Font Colors based on 2 different conditions
[英]QListView with row background in two different colors
我使用QListView
(在PyQt5中)显示字符串。 我希望该列表中每个项目的背景色在两种颜色之间变化,以使其更易于阅读。
我尝试了Qt.DecorationRole
但这只会在每个项目的左侧创建一个“图标”。
自。 listWidget.setAlternatingRowColors(True)这将为您提供每行的备用颜色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.