title: Add text to QPlainTextEdit in PyQT (the result is a status log)
body: <p>I am trying to build a StatusLog, every move that happens on an application.
  For example, the user clicked in the button1, the progressBox must receive a string like &quot;user clicked the button1&quot;.</p>
  <p>I've searched and found a link but I can't put that working out, I don't know how.</p>
  <p>Link: <a href="https://stackoverflow.com/questions/7771164/add-more-than-one-line-to-a-qtextedit-pyqt">Add more than one line to a QTextEdit PyQt</a></p>
  <p>Everytime I try it gives me <em>AttributeError: 'QPlainTextEdit' object has no attribute</em> 'insertText'</p>
  <pre><code>from PyQt4 import QtCore, QtGui
  import sys, os
  from math import ceil
  from PyQt4 import QtCore, QtGui, QtNetwork
  from qrtools import QR
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      _fromUtf8 = lambda s: s
  
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):        
  (..)
          
          #The button
          self.groupBoxAuthbtn.setSizePolicy(sizePolicy)
          self.groupBoxAuthbtn.setTitle(_fromUtf8(&quot;&quot;))
          self.groupBoxAuthbtn.setObjectName(_fromUtf8(&quot;groupBoxAuthbtn&quot;))
          self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBoxAuthbtn)
          self.horizontalLayout_2.setObjectName(_fromUtf8(&quot;horizontalLayout_2&quot;))
          self.btnAuthenticate = QtGui.QPushButton(self.groupBoxAuthbtn)
          self.btnAuthenticate.setEnabled(True)
          self.btnAuthenticate.setText(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Auth from Webcam&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.btnAuthenticate.setObjectName(_fromUtf8(&quot;btnAuthenticate&quot;))
          self.horizontalLayout_2.addWidget(self.btnAuthenticate)
          self.horizontalLayout.addWidget(self.groupBoxAuthbtn)
          #self.btnAuthenticate.clicked.connect(self.handleTest)
  
  (...)
  
          # THE STATUS LOG
          self.groupBoxProgress = QtGui.QGroupBox(self.centralwidget)
          sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
          sizePolicy.setHorizontalStretch(0)
          sizePolicy.setVerticalStretch(0)
          sizePolicy.setHeightForWidth(self.groupBoxProgress.sizePolicy().hasHeightForWidth())
          self.groupBoxProgress.setSizePolicy(sizePolicy)
          self.groupBoxProgress.setTitle(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Status&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.groupBoxProgress.setAlignment(QtCore.Qt.AlignCenter)
          self.groupBoxProgress.setObjectName(_fromUtf8(&quot;groupBoxProgress&quot;))
          self.verticalLayout_3 = QtGui.QVBoxLayout(self.groupBoxProgress)
          self.verticalLayout_3.setObjectName(_fromUtf8(&quot;verticalLayout_3&quot;))
          
          #Progress
          self.progressBox = QtGui.QPlainTextEdit(self.groupBoxProgress)
          self.progressBox.setPlainText(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;This is the all work report..&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.progressBox.setObjectName(_fromUtf8(&quot;progressBox&quot;))
          self.verticalLayout_3.addWidget(self.progressBox)
          self.verticalLayout.addWidget(self.groupBoxProgress)
          
          
          
          
          
          MainWindow.setCentralWidget(self.centralwidget)
          self.menubar = QtGui.QMenuBar(MainWindow)
          self.menubar.setGeometry(QtCore.QRect(0, 0, 847, 25))
          self.menubar.setObjectName(_fromUtf8(&quot;menubar&quot;))
          self.menuFile = QtGui.QMenu(self.menubar)
          self.menuFile.setTitle(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;File&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.menuFile.setObjectName(_fromUtf8(&quot;menuFile&quot;))
          self.menuAbout = QtGui.QMenu(self.menubar)
          self.menuAbout.setTitle(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;About&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.menuAbout.setObjectName(_fromUtf8(&quot;menuAbout&quot;))
          MainWindow.setMenuBar(self.menubar)
          self.statusbar = QtGui.QStatusBar(MainWindow)
          self.statusbar.setObjectName(_fromUtf8(&quot;statusbar&quot;))
          MainWindow.setStatusBar(self.statusbar)
          self.toolBar = QtGui.QToolBar(MainWindow)
          self.toolBar.setWindowTitle(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;toolBar&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.toolBar.setObjectName(_fromUtf8(&quot;toolBar&quot;))
          MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
          self.actionExit = QtGui.QAction(MainWindow)
          self.actionExit.setText(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Exit&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.actionExit.setShortcut(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Q&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.actionExit.setObjectName(_fromUtf8(&quot;actionExit&quot;))
          self.actionCredits = QtGui.QAction(MainWindow)
          self.actionCredits.setText(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Credits&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.actionCredits.setShortcut(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;A&quot;, None, QtGui.QApplication.UnicodeUTF8))
          self.actionCredits.setObjectName(_fromUtf8(&quot;actionCredits&quot;))
          self.menuFile.addSeparator()
          self.menuFile.addAction(self.actionExit)
          self.menuAbout.addAction(self.actionCredits)
          self.menubar.addAction(self.menuFile.menuAction())
          self.menubar.addAction(self.menuAbout.menuAction())
          
  
          self.retranslateUi(MainWindow)
          
          QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL(_fromUtf8(&quot;activated()&quot;)), MainWindow.close)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
          MainWindow.setTabOrder(self.btnAuthenticate, self.progressBox)
  
  
  
      def retranslateUi(self, MainWindow):
          pass        
  </code></pre>