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. Customizing a QPLainText widget or creating a new one
QtWS25 Last Chance

Customizing a QPLainText widget or creating a new one

Scheduled Pinned Locked Moved Unsolved General and Desktop
qplaintexteditqwidgetdatastructuresqtextcursorqtextdocument
3 Posts 2 Posters 606 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.
  • K Offline
    K Offline
    kaliy23
    wrote on last edited by
    #1

    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!

    jsulmJ 1 Reply Last reply
    0
    • K kaliy23

      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!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      2
      • jsulmJ jsulm

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

        K Offline
        K Offline
        kaliy23
        wrote on last edited by
        #3

        @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
        0

        • Login

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