![](/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.