【发布时间】:2016-10-12 04:11:58
【问题描述】:
如何去除QTreeWidgetItem 的背景颜色,或将其重置为默认值?
treeWidgetItem.setBackgroundColor(0, QtGui.QColor('green'))
【问题讨论】:
-
之前是怎么设置的?
-
treeWidgetItem.setBackgroundColor(0, QtGui.QColor('green')) #
-
你为什么需要奋斗?你只需做
treeWidgetItem.setBackgroundColor(0, QtGui.QColor('white')) -
@ShellRox 如果默认背景颜色不是白色怎么办?
-
@PatrizioBekerle 我在下面提到了另一种方法。
标签: python colors background pyqt qtreewidgetitem