Hi
First of all I want to thank everyone in this forum who helped me to understand PySide.
I have a question about QtCore.QProcess:
Here how my program works: I have button (QtGui.QPushButton) when it gets clicked, my program should call my C compiler (GCC) and compile the source code. This works perfectly when I had no GUI (Command Line) using subprocess.
Now I'm trying to use QProcess to do a same thing. My MainWindow class has one instance of QProcess and once instance of QtGui.QTextEdit
on __init__
self.process = QtCore.QProcess(self)
self.textEdit = QTextEdit(self)
self.textEdit.move(x, y)
and more
now my button (Which is not in the above code), called btn_run has an event the when it gets clicked it start the process
args = ["-o", "myfile", "myfile.c"]
self.process.start("gcc", args)
Now what I want to do is to get the outputs that generated by gcc on STDOUT, STDERR from QProcess to show them in QTextEdit line by line (as gcc puts something on STOUT or STDERR I show that on my QTextEdit)
Here are two problems that I have, First my UI freezes, meaning that I cant press anything else with my UI and I get no output on my QTextEdit. (I used readLine() function which is from QIODevice, which is a parent class of QProcess).
Any suggestion?
Thanks again.
--
Mark