I have a Qt "Text Edit" widget in my Gui and this widget is used to log something. I add every line(s) this way:
QString str;
str = ...
widget.textEdit_console->append(str);
by this way the Text Edit height will increase more and more after each new line. I want it act like a terminal in this case, I mean after some number (that I set) of lines entered, for each new line the first line of Text Edit being deleted to prevent it being too big! should I use a counter with every new line entered and delete the first ones after counter reached it's top or there is better way that do this automatically after
widget.textEdit_console->append(str);
called ?