Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Syntax highlighting doubt

Syntax highlighting doubt

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 562 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Izabel
    wrote on last edited by
    #1

    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.

    JonBJ 1 Reply Last reply
    0
    • I Izabel

      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.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Izabel
      For a full editor I do think you will want Qsci/QScintilla rather than just plain QSyntaxHighlighter.

      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 QsciScintilla worked for them.

      I 1 Reply Last reply
      1
      • JonBJ JonB

        @Izabel
        For a full editor I do think you will want Qsci/QScintilla rather than just plain QSyntaxHighlighter.

        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 QsciScintilla worked for them.

        I Offline
        I Offline
        Izabel
        wrote on last edited by
        #3

        @JonB Thanks!!!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved