[英]How to remove lexer in qscintilla
How can I remove a lexer in qscintilla that I have set with.setLexer(lexer) if the user wants to go back to plain text?如果用户想返回纯文本,我如何删除 qscintilla 中我用 .setLexer(lexer) 设置的词法分析器? I have not found anything in the documentation .
我没有在文档中找到任何内容。 I'm using PyQt5 with Python3.
我在 Python3 中使用 PyQt5。
I tried as @ekumoro replied in the comment above and it is working pretty fine.我试过@ekumoro 在上面的评论中回复,它工作得很好。
self.__editor.setLexer(None)
self.__editor.setLexer(None)
https://scintilla.sourceforge.io/ScintillaDoc.html#SCI_SETLEXER https://scintilla.sourceforge.io/ScintillaDoc.html#SCI_SETLEXER
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.