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. Creating Python bindings for KSyntaxHighlighter with shiboken
Qt 6.11 is out! See what's new in the release blog

Creating Python bindings for KSyntaxHighlighter with shiboken

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 436 Views 2 Watching
  • 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.
  • W Offline
    W Offline
    winterdj
    wrote on last edited by
    #1

    I'm building a PySide6 application which needs to have syntax highlighting for Markdown, amongst other languages. Rather than reinvent the wheel with QSyntaxHighlighter, as I'm sure lots of other developers may have had to do, I was hoping to create Python bindings for KSyntaxHighlighter, which is currently written in C++ with Qt and powers the Kate editor. This is a subclass of QSyntaxHighlighter and has support for numerous languages and colour themes.

    The source can be found here: https://invent.kde.org/frameworks/syntax-highlighting

    With some further documentation here: https://api.kde.org/frameworks/syntax-highlighting/html/index.html

    I understand that Shiboken was the tool created by Qt to develop the PySide bindings, and I wondered if this was the best fit to build Python bindings, a standalone Python package that could be used alongside PySide6 to use this syntax highlighter in my project?

    Does anyone have any strong experience using Shiboken? I'm going to have a stab at it myself but would appreciate anyone else who would be keen to help. Or any pointers/guidance would be much appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I would recommend checking with both KDE and the Qt for Python folks. There have been bindings generated earlier using PyQt's sip but I don't think anybody has tried with shiboken.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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