repaint problem in QTextEdit
Hi all,
Basically I'm displaying thousands of lines on a QTextEdit sequentially.
However, no matter I use edit.append() or cursor.insertText(), lines are only displayed when all the lines are written and the editor is blocked until then.
I try to use edit.repaint(), edit.update() and even thread.wait() after writing every line. But none of these work. What am I supposed to solve this problem?
Re: repaint problem in QTextEdit
Try calling QCoreApplication::processEvents() in between appending text:
Code:
edit.append(...);
qApp->processEvents();
edit.append(...);
..
Re: repaint problem in QTextEdit
It's working now.Great, thanks ~