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. QTextDocument + QML TextArea ideas for handling large content
Forum Updated to NodeBB v4.3 + New Features

QTextDocument + QML TextArea ideas for handling large content

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtextdocumenttextarearichtext
2 Posts 1 Posters 433 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.
  • D Offline
    D Offline
    Deymos
    wrote last edited by Deymos
    #1

    Hello, I made a WYSIWYG editor inspired by an example (https://doc.qt.io/qt-6/qtquickcontrols-texteditor-example.html )
    The problems started when I inserted a large number of images, tables and text (about 40 pages) construct it via html builder who makes <div> with my content, so I use rich text.
    When scrolling through content, a huge amount of memory is consumed, and when changing text (adding/deleting), there are lags for several seconds, as I understand it, due to the recalculation of the layout.

    You can check the performance of the qt example yourself by inserting huge html content there.

    Perhaps someone has encountered this and there are ways to solve the problem?

    I was thinking about requesting only the necessary pages from QTextDocument for display, and requesting another +-3 pages in one direction and the other when scrolling, but I'm not sure if this will solve the problem.

    If you need more information, I will be happy to provide it.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Deymos
      wrote last edited by
      #2

      I found marknote, I see that the performance is fine, but I don't understand why, the logic in general is very similar

      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