I created a special file viewer tool in Qt to display text data around 1-30 MBytes.
I used QPlainTextEdit in readonly mode with disabled word wrapping to display the text.
I have a 20MByte example file and the call of QPlainTextEdit::setPlainText() takes about 6.5 seconds which is not acceptable by me wanting to use this tool very often.
Opening the same file with Notepad++ or TotalCommander's Lister takes an imperceptible amount of time (much less than a second).
Do you have any idea how can I solve this?
Can it be improved with this editor type?
Is there any other text viewer class that can do it faster?
Is it possible to create an own text viewer class to improve performance?