I'd say that loading 500k lines of text into a simple text editor like QTextEdit is nothing but a suicide
How exactly do you load it? Using QTextDocument or QTextEdit::setPlainText() or simmilar?
I'd say that loading 500k lines of text into a simple text editor like QTextEdit is nothing but a suicide
How exactly do you load it? Using QTextDocument or QTextEdit::setPlainText() or simmilar?
I load the text using setPlainText(text)
regards
That's why it takes so much time. You should create a QTextDocument first and then use QTextEdit::setDocument() to make QTextEdit display it. It should operate much faster on the text then.Originally Posted by sreedhar
sunil.thaha (16th June 2006)
I have tried loading the text on a separate timer, as described here on this thread. This leads to a fist and fast disaplay, and then the UI gets freezed for several seconds. I also tried some sort of thread test, and still got the same effect with much uglier code.
I will try the example described here with the separate QTextDocument. This might solve some issues.
But still, the problem may be the slow paiting in the syntax highlighter, can you show some code?
Bookmarks