correlation_table.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ECoG-ClusterFlow 作者: sugeerth 项目源码 文件源码
def paint(self, painter, option, index):
            painter.fillRect(option.rect, index.data(QtCore.Qt.BackgroundRole))
            super(CorrelationTableDisplay.BackgroundDelegate, self).paint(painter, option, index)
            if option.state & QtGui.QStyle.State_Selected:
                painter.save()
                # Pointer to green
                pen = QtGui.QPen(QtCore.Qt.darkGreen, 2, QtCore.Qt.SolidLine, QtCore.Qt.SquareCap, QtCore.Qt.MiterJoin)
                myrect = option.rect.adjusted(0, 1, 0, 0)
                painter.setPen(pen)
                painter.drawLine(myrect.topLeft(), myrect.topRight())
                painter.drawLine(myrect.bottomLeft(), myrect.bottomRight())
                if index.column() == 0:
                    painter.drawLine(myrect.topLeft(), myrect.bottomLeft())
                if index.column() == index.model().columnCount()-1:
                    painter.drawLine(option.rect.topRight() + QtCore.QPoint(0, -1), option.rect.bottomRight()+ QtCore.QPoint(0, -1))
                painter.restore()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号