View Full Version : Read output of QProcess in runtime

23rd September 2012, 15:11
Hi everyone.

I'm creating a GUI for a commandl-line linux application and i've finished the "argument wrapping stange"
Now i have to read the output of the command line app while it is running so i can't use the waitforread or the readytoread signals :S
my code:

proc= new QProcess(this); //proc is global QProcess*
QObject::connect(proc,SIGNAL(readyRead()),this,SLO T(readoutput()));

proc->start("./asd",args); //args is QStringList*

void Widget::readoutput()
qDebug() << proc->readStandardOutput();
qDebug() << proc.readStandartError()

but as i said it's not working i have to wait till the process is finished..

23rd September 2012, 20:16
That`s because you connected the wrong signal.
Read the docs.