Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Source code view widget
QtWS25 Last Chance

Source code view widget

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 2.0k 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.
  • V Offline
    V Offline
    Vadi2
    wrote on last edited by
    #1

    I need to view and edit code in my application. What is a good widget I could use to obtain syntax highlighting and features such as search&replace?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Kate form KDE: https://api.kde.org/frameworks/ktexteditor/html/annotated.html

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • V Offline
        V Offline
        Vadi2
        wrote on last edited by
        #3

        Sorry, KDE widgets would require too many dependencies and cross-platform support is not KDE's main priority unlike Qt's. Any others available?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          To add to @VRonin, KSyntaxHighlighting framework:

          The KSyntaxHighlighting framework is a tier 1 functional framework that solely depends on Qt (no dependency on Qt Widgets or QML), is very well unit tested, and licensed under the LGPLv2+.

          VRoninV 1 Reply Last reply
          3
          • ? A Former User

            To add to @VRonin, KSyntaxHighlighting framework:

            The KSyntaxHighlighting framework is a tier 1 functional framework that solely depends on Qt (no dependency on Qt Widgets or QML), is very well unit tested, and licensed under the LGPLv2+.

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #5

            @Wieland True but I considered Kate more relevant here as, from https://api.kde.org/frameworks/syntax-highlighting/html/index.html

            To not turn this into yet another text editor, the following things are considered out of scope:

            • code folding, beyond providing folding range information
            • auto completion
            • spell checking
            • user interface for configuration
            • management of text buffers or documents

            If you need any of this, check out KTextEditor.


            KDE widgets would require too many dependencies

            Not all of them but this one is Tier 3 so I can see how this can scare people off but at the end of the day is very easy using CMake to build the whole KDE API environment

            cross-platform support is not KDE's main priority

            It's not neglected either btw, Kate works in all desktop environments supported by Qt

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            ? 1 Reply Last reply
            2
            • VRoninV VRonin

              @Wieland True but I considered Kate more relevant here as, from https://api.kde.org/frameworks/syntax-highlighting/html/index.html

              To not turn this into yet another text editor, the following things are considered out of scope:

              • code folding, beyond providing folding range information
              • auto completion
              • spell checking
              • user interface for configuration
              • management of text buffers or documents

              If you need any of this, check out KTextEditor.


              KDE widgets would require too many dependencies

              Not all of them but this one is Tier 3 so I can see how this can scare people off but at the end of the day is very easy using CMake to build the whole KDE API environment

              cross-platform support is not KDE's main priority

              It's not neglected either btw, Kate works in all desktop environments supported by Qt

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              @VRonin Yes, all true. I used Kate as a plugin before, too. Works very well. But, if the OP doesn't want to use KTextEditor, I thought he might at least want to use the highlighter.

              1 Reply Last reply
              2
              • V Offline
                V Offline
                Vadi2
                wrote on last edited by
                #7

                I've found https://github.com/edbee/edbee-lib since then which we'll be giving a go!

                1 Reply Last reply
                1
                • V Offline
                  V Offline
                  Vadi2
                  wrote on last edited by
                  #8

                  Update: we've deployed it in https://www.mudlet.org/2017/07/mudlet-3-3-1-new-code-editor-new-irc-and-utf8-in-lua-support/. Pretty lightweight, has themes and multi-caret editing - if you're in the market for a new editor I recommend it.

                  1 Reply Last reply
                  1

                  • Login

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