title: Unknown ouput with qdebugstream and qtextedit
body: <p>The first output in the textedit is a number 3, I don't know why that number is coming form Qt::LogText. This question is based from a previous question I had asked, I'm using the same qdebugstream header file from the link below. </p>
  
  <p><a href="https://stackoverflow.com/questions/10308425/redirect-stdcout-to-a-qtextedit">Redirect std::cout to a QTextEdit</a></p>
  
  <p>The new project below is a QT Gui Application that will redirect the cout to a textedit. Also, since settextformat() is no longer a member of QTextEdit, I converted Qt::LogText into a string. </p>
  
  <p>This was based on another post but I did not understand the solution. 
  <a href="https://stackoverflow.com/questions/3060141/qt-qtexteditsettextformatqtlogtext-does-not-exist-anymore-what-else-can">QTextEdit::setTextFormat(Qt::LogText) does not exist anymore, what else can I use to log?</a>. 
  Can someone provide more information on this?</p>
  
  <p><strong>mainwindow.cpp</strong></p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  
  
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  
  
      ui-&gt;textEdit-&gt;setReadOnly(true);
      ui-&gt;textEdit-&gt;setText(QString("%1").arg(Qt::LogText));
  
      QDebugStream qout(std::cout, ui-&gt;textEdit);
  
      cout &lt;&lt; "Send this to the Text Edit!" &lt;&lt; endl;
  
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  </code></pre>
  
  <p><strong>Mainwindow.h</strong></p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  #include "qdebugstream.h"
  #include "stdio.h"
  #include "iostream"
  
  using namespace std;
  
  namespace Ui {
  class MainWindow;
  }
  
  class QtextEdit;
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private:
      Ui::MainWindow *ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>