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.
Asked
Active
Viewed 101 times
1 Answers
0
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

Rida Shamasneh
- 767
- 1
- 6
- 16
-
1The `setLexer` slot is part of the QScintilla API and the docs for it are [here](https://www.riverbankcomputing.com/static/Docs/QScintilla/classQsciScintilla.html#a7bc5fb5d0daf8261544fb6fe738a0c91). The `SCI_SETLEXER` message is part of the underlying Scintilla API, and it does not do the same thing. – ekhumoro Dec 23 '19 at 22:02
-
u'r right ... thanks for the link however, the API names are close – Rida Shamasneh Dec 24 '19 at 08:14