How to remove lexer in qscintilla

114 Views Asked by At

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.

1

There are 1 best solutions below

2
Rida Shamasneh On BEST ANSWER

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