querymodel.py 文件源码

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

项目:Mac-Python-3.X 作者: L1nwatch 项目源码 文件源码
def data(self, index, role):
        value = super(CustomSqlModel, self).data(index, role)
        if value is not None and role == Qt.DisplayRole:
            if index.column() == 0:
                return '#%d' % value
            elif index.column() == 2:
                return value.upper()

        if role == Qt.TextColorRole and index.column() == 1:
            return QColor(Qt.blue)

        return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号