There are some 'similar' questions in stackoverflow, but can't quite implement them. In pyqt, I'm trying to pipe the output of a logfile (which is updating real-time) into a QTextEdit widget. The code I have so far is:
file = QFile('tmp')
fh = file.open(QIODevice.ReadOnly)
stream = QTextStream(file)
while not stream.atEnd():
line = stream.readLine()
self.logTextEdit.append(line)
file.close()
which processes the current contents, but not any subsequent changes. Ideally, a Qt signal would alert me to read another line as it's available and write it directly to TextEdit.