Results 1 to 2 of 2

Thread: QPlainTextEdit display large plain text

  1. #1
    Join Date
    Jan 2011
    Posts
    21
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default QPlainTextEdit display large plain text

    Hi,

    In my application I take some data from a file, process it using QtConcurrent to a text format and at the end of QtConcurrent emit append signal to QPlainTextEdit.
    The problem is that the MainWindow becomes unresponsive, freezes when there is more than e.g. 20.000 lines. I have try to split the text into smaller chunks or append 1 line at a time but that did not help.

    Can anyone recommend me some way how can I avoid freezing of MainWindow in this situation ?
    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPlainTextEdit display large plain text

    Use QTextCursor interface and make sure you manipulate the document from the main thread.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    ArkKup (14th March 2013)

Similar Threads

  1. example of QPlainTextEdit subclass to handle large text files
    By nekkro-kvlt in forum Qt Programming
    Replies: 2
    Last Post: 17th October 2012, 15:30
  2. Display an image to a plain QWidget
    By franco.amato in forum Qt Programming
    Replies: 4
    Last Post: 19th March 2012, 10:07
  3. About Box - Scroll Plain Text
    By sheeeng in forum Newbie
    Replies: 2
    Last Post: 20th October 2009, 10:04
  4. QString is a richText or plain text
    By SamSong in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2009, 01:19
  5. QTextEdit + paste rich text as plain text only
    By Yong in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2008, 17:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.