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. QTextEdit, html performance
Forum Updated to NodeBB v4.3 + New Features

QTextEdit, html performance

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.1k 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Hi. I'm using the QTextEdit to show text as log, in html format.
    The performance is very slow. Is there a way to increase it? I need to append lines using some colors and some text in bold.

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • mandruk1331M Offline
      mandruk1331M Offline
      mandruk1331
      wrote on last edited by
      #2

      For highlighting you can use this as an example:
      http://doc.qt.io/qt-5/qtwidgets-richtext-syntaxhighlighter-example.html

      Mandruk1331

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        How many log lines are we talking about ?
        The layout engine is not really optimized for a log viewer widget use case
        as line count is often massive.

        If the only markup you need it bold and color - have you considered writing a custom control
        that understand those 2 tags and do the drawing using painter.

        You could also reuse existing viewers and add "bold" to it
        https://github.com/nickbnf/glogg

        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