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. No widgets for long string visualization?
Qt 6.11 is out! See what's new in the release blog

No widgets for long string visualization?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.9k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello there,

    I need to show very long strings in my GUI (thousands of charater). I also need show very long lines (a new line every 10000 - 20000 characters), so I ve setted vertical scroll as always active, and lineWrapMode = NoWrap (this mode seems to make a worse performance). You can see what I mean in the image below.

    !http://i43.tinypic.com/2945vmc.png(Image)!

    Well, I've tried with QTextEdit and QPlainText. This last one has a better performance, but its not enough for a good scroll moving and navigate between these long strings.

    How can I use a widget with a fine performance for this kind of data?

    Thanks

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kenchan
      wrote on last edited by
      #2

      Hello,

      If you are only displaying them why not paint them yourself? Then the performance is up to you...

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

        Ty kenchan for your fast reply.

        I need some functions from QTextEdit or QPlainText like select data, get selected data, select a column etc... If I paint the text in a QGraphicsScene, I think I'm losing all this stuff, isn't?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kenchan
          wrote on last edited by
          #4

          I have never subclassed QTextEdit or QPlainText so I don't know how much work it takes.
          I don't think you need to draw to a QGraphicsScene, just a plain widget should do the job.

          I think the font you use will also influence the performance.

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

            Thanks again Ken,

            I've tried with some other font with the same result.

            I dont know what you mean with a plain widget. Maybe did you mean use labels?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kenchan
              wrote on last edited by
              #6

              Yes, a label would do.

              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