9
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 "user clicked the button1".
I've searched and found a link but I can't put that working out, I don't know how.
Link: Add more than one line to a QTextEdit PyQt
Everytime I try it gives me AttributeError: 'QPlainTextEdit' object has no attribute 'insertText'
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(""))
self.groupBoxAuthbtn.setObjectName(_fromUtf8("groupBoxAuthbtn"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBoxAuthbtn)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.btnAuthenticate = QtGui.QPushButton(self.groupBoxAuthbtn)
self.btnAuthenticate.setEnabled(True)
self.btnAuthenticate.setText(QtGui.QApplication.translate("MainWindow", "Auth from Webcam", None, QtGui.QApplication.UnicodeUTF8))
self.btnAuthenticate.setObjectName(_fromUtf8("btnAuthenticate"))
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.Expandi