Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Customizing a QPLainText widget or creating a new one

    General and Desktop
    qplaintextedit qwidget datastructures qtextcursor qtextdocument
    2
    3
    290
    Loading More Posts
    • 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.
    • K
      kaliy23 last edited by

      Hello!
      I'm building a text editor and the requirements for speed & scaling are rather strict. I need the editor to work swiftly even on very large files. The existing widgets are not fast enough, and, as the file grows larger, the program freezes.
      I would like to use a piece table data structure instead of QString.
      Is it possible to customize the QPlainTextEdit widget to work with my own custom class and not the QString? Or would you advice to write a new widget? This seems like a whole lot of work, as QTextCursor and QTextDocument also work with QStrings and will need to be modified.
      I would appreciate any suggestion on how to approach this issue!

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @kaliy23 last edited by

        @kaliy23 I suggest you take a look at https://qscintilla.com/#

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        K 1 Reply Last reply Reply Quote 2
        • K
          kaliy23 @jsulm last edited by

          @jsulm, I apologize, I should've mentioned it in the original post: one of the requirements of the project is that we can not use any 3rd party library for the text editor, except for Qt.
          From what I see in the QScintilla github, it is ported to Qt on top of the TextEdit widget, so I will look further into their implementation to figure out how they've done it.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post