(self, painter, option, index)
Overloads `paint` to draw borders
Overloads `paint` to draw borders
Overloads paint to draw borders
def paint(self, painter, option, index):
        """Overloads `paint` to draw borders"""
        QStyledItemDelegate.paint(self, painter, option, index)
        if index.data(BorderRole):
            painter.save()
            painter.setPen(index.data(BorderColorRole))
            rect = option.rect
            painter.drawLine(rect.topLeft(), rect.topRight())
            painter.restore()
def paint ( self , painter , option , index ) : QStyledItemDelegate . paint ( self , painter , option , index ) if index . data ( BorderRole ) : painter . save ( ) painter . setPen ( index . data ( BorderColorRole ) ) rect = option . rect painter . drawLine ( rect . topLeft ( ) , rect . topRight ( ) ) painter . restore ( )