Syntax highlighting doubt
-
Hi again!
What I'm making is basically an IDE for blockchain development and I need to add syntax highlighting and maybe autocompletion features for at least python, solidity and javascript.
I saw that I could subclass QSyntaxHighlighter and add the rules to format text (making everything from scratch), but I also saw that there is some module called Qsci/QScintilla that helps with that.
The thing is, I'm not finding examples of how to use Qsci with PyQt6, just with older versions. Importing from PyQt6.Qsci doesn't even appear as an option, so at this point I'm not even sure if it works with this version or If I need to install additional packages.
I'd really appreciate it if someone knows some documentation of how to use Scintilla with PyQt6 or If I should just do it from scratch and that's it.
-
Hi again!
What I'm making is basically an IDE for blockchain development and I need to add syntax highlighting and maybe autocompletion features for at least python, solidity and javascript.
I saw that I could subclass QSyntaxHighlighter and add the rules to format text (making everything from scratch), but I also saw that there is some module called Qsci/QScintilla that helps with that.
The thing is, I'm not finding examples of how to use Qsci with PyQt6, just with older versions. Importing from PyQt6.Qsci doesn't even appear as an option, so at this point I'm not even sure if it works with this version or If I need to install additional packages.
I'd really appreciate it if someone knows some documentation of how to use Scintilla with PyQt6 or If I should just do it from scratch and that's it.
@Izabel
For a full editor I do think you will want Qsci/QScintilla rather than just plainQSyntaxHighlighter.Page https://pypi.org/project/PyQt6-QScintilla/ seems to be the link for it for PyQt6?
https://stackoverflow.com/questions/68564852/trying-to-use-scn-modified-with-pyqt6-generates-a-typeerror-crash shows someone using it with PyQt6. I see that
from PyQt6.Qsci import QsciScintillaworked for them. -
@Izabel
For a full editor I do think you will want Qsci/QScintilla rather than just plainQSyntaxHighlighter.Page https://pypi.org/project/PyQt6-QScintilla/ seems to be the link for it for PyQt6?
https://stackoverflow.com/questions/68564852/trying-to-use-scn-modified-with-pyqt6-generates-a-typeerror-crash shows someone using it with PyQt6. I see that
from PyQt6.Qsci import QsciScintillaworked for them.