title: error when i'm trying to set text in qTextEdit
body: <p>I'm using Qt 5.3 with MSVC2013. Here is some part of my code:</p>
  
  <p><strong>mainwindow.cpp</strong></p>
  
  <pre><code>#include "mainwindow.h"
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent)
  {
      setupUi(this);
      connect(okButton,SIGNAL(clicked()),SLOT(onOKClicked()));
  }
  
  void MainWindow::onOKClicked(){
      arr0.Put(addBox-&gt;value(),posBox-&gt;value());
      QString str = arr0.GetArrText();
      arrayContent-&gt;setText(str);
  }
  </code></pre>
  
  <p>The content of the variable "str" is alright as it is working with qDebug.</p>
  
  <p>The arrayContent variable is a QTextEdit. When I try to use setText(), I'm getting the following error:</p>
  
  <pre><code>QTextCursor::setPosition: Position '7' out of range
  </code></pre>
  
  <p>Do you know why it is happening to me?</p>