featureCodeEditor.py 文件源码

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

项目:defconQt 作者: trufont 项目源码 文件源码
def __init__(self, parent=None):
        super(FeatureCodeHighlighter, self).__init__(parent)

        keywordFormat = QTextCharFormat()
        keywordFormat.setForeground(QColor(45, 95, 235))
        self.addRule("\\b(?<!\\\\)(%s)\\b" % ("|".join(keywordPatterns)),
                     keywordFormat)

        singleLineCommentFormat = QTextCharFormat()
        singleLineCommentFormat.setForeground(QColor(112, 128, 144))
        self.addRule("#[^\n]*", singleLineCommentFormat)

        groupFormat = QTextCharFormat()
        groupFormat.setForeground(QColor(255, 27, 147))
        self.addRule("@[A-Za-z0-9_.]+", groupFormat)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号