Read output of QProcess in runtime
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:
Code:
proc
= new QProcess(this);
//proc is global QProcess* QObject::connect(proc,
SIGNAL(readyRead
()),
this,
SLOT(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..
Re: Read output of QProcess in runtime
That`s because you connected the wrong signal.
Read the docs.