<div dir="ltr"><div><div><div>Hi<br></div>I have implemented a GUI using PyQt4/python3, which allows the user to select a few files as command-line arguments. When I hit "OK" button, my application runs and the output text is displayed on the terminal where I run the python script. I would like to redirect this text to a TextEdit window I have created on the GUI:<br>
<br>self.textEdit = QtGui.QTextEdit(Form)<br>self.textEdit.setGeometry(QtCore.QRect(10, 300, 421, 141))<br>self.textEdit.setObjectName(_fromUtf8("textEdit"))<br><br></div>Do you have any suggestions/tips as to how I can accomplish this task? Using some suggestions online,  I tried creating a QProcess object and connect the signal to a function which  reads the std output. But I don't know how to set the arguments to the call "process.start".<br>
</div><div><br>self.process = QtCore.QProcess()<br>QtCore.QObject.connect(self.process, QtCore.SIGNAL("readyReadStdout()"), self.readOutput)<br></div><div>I know I have to call self.process.start here but am not able to find examples of how to do it. One example online uses "self.process.setArguments", but python3/pyQt4 doesn't seem to know about it. Using the argument directly with process.start is not helping either.<br>
<br>Appreciate any pointers. If there are better ways than what I am trying to use, appreciate that as well.<br><br></div><div>Thanks,<br></div><div>-SM<br></div></div>