def data(self,index,role = QtCore.Qt.DisplayRole):
try:
if role == QtCore.Qt.BackgroundColorRole and index.isValid():
for item in self.__colorRow.values():
if index.row() in item["indexes"]:
#return item["color"]
return QtGui.QBrush(QtCore.Qt.yellow)
except:
pass
return super(QtGui.QSortFilterProxyModel,self).data(index,role)
评论列表
文章目录