I have been trying to make a small PyQt4 widget, but i have trouble pasting the subprocess into the textbox of the widget.
self.textEdit_2 = QtGui.QTextEdit(self.tab_Logcat)
self.textEdit_2.setGeometry(QtCore.QRect(0, 0, 781, 731))
self.textEdit_2.setObjectName(_fromUtf8("textEdit_2"))
def paster(self):
from subprocess import Popen, PIPE
cat = subprocess.Popen('adb', stdout=PIPE)
self.textEdit_2.setText(str(cat))
No matter what i try, it paste to the shell insteed. i have looked at the other similar thread How to redirect print result from python shell into qtextedit pyqt?
But it dosent seem to work with subprocess.