I have Qt "Text Editing" in my Gui, and this widget is used to register something. I add each line as follows:
QString str;
str = ...
widget.textEdit_console->append(str);
thus, the height of the text editing will increase more and more after each new line. I want it to act as a terminal in this case, I mean after a certain number (which I set) of the entered lines, for each new line the first line of text editing is deleted to prevent it being too big! should I use the counter with each new line entered and delete the first after the counter reaches the top or is there a better way to do this automatically after
widget.textEdit_console->append(str);
is called?
source
share