highlighter.py 文件源码

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

项目:notepad 作者: lfsando 项目源码 文件源码
def format(color, style=''):

    word_color = QColor()
    word_color.setNamedColor(color)
    word_format = QTextCharFormat()
    word_format.setForeground(word_color)
    if 'italic' in style:
        word_format.setFontItalic(True)
    elif 'bold' in style:
        word_format.setFontWeight(QFont.Bold)

    return word_format
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号