pythonpyqtpyqt5qscintilla

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? I have not found anything in the documentation. I'm using PyQt5 with Python3.


Solution

  • I tried as @ekumoro replied in the comment above and it is working pretty fine.

    self.__editor.setLexer(None)

    https://scintilla.sourceforge.io/ScintillaDoc.html#SCI_SETLEXER enter image description here