title: Need to display in qtextEdit real time
body: <p>I have an arm board with a touchscreen display, where I want to display the output from a certain function, vcm_test(). The output of this function is saved to a file called 
  <em>test.txt</em> . Now I am able to read the contents of the file <em>test.txt</em> and display it in my <em>qtextEdit</em> only if it is less than 50-60 lines. Whereas I have more than 7000 lines in the <em>test.txt</em> . When I try to display 7000 lines the arm board keeps reading and nothing is displayed until reading is complete. Is there any way to read and display after every line or say every 10 lines. I thought of using qProcess in readfile too, but I have no idea how I can do that.</p>
  
  <pre><code>    connect(ui-&gt;readfil, SIGNAL(clicked()), SLOT(readfile()));
      connect(ui-&gt;VCMon, SIGNAL(clicked()), SLOT(vcm_test()));
      connect(ui-&gt;Offloaderon, SIGNAL(clicked()), SLOT(offloader_test()));
      connect(ui-&gt;quitVCM, SIGNAL(clicked()),vcmprocess, SLOT(kill()));
      connect(ui-&gt;quitoffloader, SIGNAL(clicked()),offloaderprocess, SLOT(kill()));}
      MainWindow::~MainWindow(){
          delete ui;}
      void MainWindow::readfile(){
          QString filename="/ftest/test.txt";
          QFile file(filename);
          if(!file.exists()){
              qDebug() &lt;&lt; "NO file exists "&lt;&lt;filename;}
          else{
              qDebug() &lt;&lt; filename&lt;&lt;" found...";}
          QString line;
          ui-&gt;textEdit-&gt;clear();
          if (file.open(QIODevice::ReadOnly | QIODevice::Text)){
              QTextStream stream(&amp;file);
              while (!stream.atEnd()){
                  line = stream.readLine();
                  ui-&gt;textEdit-&gt;setText(ui-&gt;textEdit-&gt;toPlainText()+line+"\n");
                  qDebug() &lt;&lt; "line: "&lt;&lt;line;}
      }
      file.close();}
      void MainWindow::vcm_test(){
          vcmprocess-&gt;start("/ftest/vcm_test_2");}
      void MainWindow::offloader_test(){
          offloaderprocess-&gt;start("/ftest/off_test_2");}
  </code></pre>
  
  <p>Any advice is really appreciated.Thanks. </p>