I created two TextEditor components, one for user input and the other for text output, like a chat. The problem is that when I add text to the output TextEditor (via setText method), autoscrolling does not work. It works only when I put text directly into the output TextEditor.
Is there a way to get autoscrolling to work in this case? Here is a sample code of what I need to do:
well you could just do chatOutput->getText().length().
String contents are reference counted anyway though, so it’s not like it’s actually copying the entire contents to a new variable. I guess the decision you have to make is “do i want the line where i call chatOutput->setText() to be made longer by using chatOutput->getText() as the first parameter too?”