Also, while playing with the TextEditor, I got some strange numbers, performance-wise.
I am trying to use a read-only TextEditor as a text output console, repeatedly calling TextEditor::insertTexAtCursor().
When adding more than a thousand lines, things start getting very expensive and unbearably slow.
A little bit of profiling showed that the undo manager gets very busy while inserting lines. Disabling when in read-only mode improved things.
I noticed that 90% of the cpu time spent in TextEditor::insert is sucked up by moveCursorTo (which tries to reposition the viewport to make the cursor visible, and therefore recomputes a lot of text metrics).
And I’m pretty much stuck here.
Am I using the wrong Component for this task?