Exemple #1
0
 def drawBackground(self, painter, option, index):
     QItemDelegate.drawBackground(self,painter,option,index)
     item = index.model().itemFromIndex(index)
     print('----------- About to paint item with priority {0}'.format(item.task.priority))
     item.setBackground(self.rowColors[item.task.priority])
     painter.save()
     #painter.restore()