Printing QProcess Stdout only if it contains a Substring
问题 A PyQt4 app runs ping in a QProcess . A QTextEdit named self.output will output everything from ping . A second QTextEdit named self.summary will only output the line if it contains the string TTL . Problem: I have managed to get self.output working but not self.summary as I am not sure how to write its code in the dataReady function. Any ideas? import sys from PyQt4 import QtGui, QtCore class MainWindow(QtGui.QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.initUI()