title: Qt Text Edit with a fixed number of input lines
body: <p>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:</p>
  
  <pre><code>QString str;
  str = ...
  widget.textEdit_console-&gt;append(str);
  </code></pre>
  
  <p>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</p>
  
  <pre><code>widget.textEdit_console-&gt;append(str);
  </code></pre>
  
  <p>called ?</p>