Help on QProcess - Output Read
Hi,
I am running the below process in my application
Code:
myProcess->start("/EXEC/Unlock");
myProcess->waitForFinished();
//qDebug() << "Unlock Output:" << myProcess->readAll();
qDebug() << "Unlock Output:\n" << myProcess->readAllStandardOutput();
QByteArray newData
=myProcess
->readAllStandardOutput
();
qDebug() << "Unlock Output:" << newData;
But the output i read from the read using all the above methods gives empty string.
Help me
In my Process application I will put the below output in console:
Code:
qDebug() << "FileName Output:" << fileName;
Qprocess Help - On readallstandardOutput
Quote:
Originally Posted by
augusbas
Hi,
I am running the below process in my application
Code:
myProcess->start("/EXEC/Unlock");
myProcess->waitForFinished();
//qDebug() << "Unlock Output:" << myProcess->readAll();
qDebug() << "Unlock Output:\n" << myProcess->readAllStandardOutput();
QByteArray newData
=myProcess
->readAllStandardOutput
();
qDebug() << "Unlock Output:" << newData;
But the output i read from using all the above methods gives empty string.
Help me
In my Process application I will put the below output in console:
Code:
qDebug() << "FileName Output:" << fileName;
Anybody please help
Re: Help on QProcess - Output Read
I think you can read this thread
http://www.qtcentre.org/forum/f-qt-p...light=QProcess
He read ping output...
Re: Help on QProcess - Output Read
Quote:
Originally Posted by
wirasto
Hi,
thanks for reply...
In my process application, i am trying to put data through qdebug i.e I am printing a QString.
Whether this is the right way to put standard output data?
And i am reading the data in my application through readAllStandardOutput() ; But my output is empty string.
I referred the link send by you, still for me the same output "Empty String"
need your help
Re: Help on QProcess - Output Read
qDebug() puts output on standard error so if you want to read output from qDebug() just read standard error: QProcess::readAllStandardError()
Re: Help on QProcess - Output Read
Quote:
Originally Posted by
faldżip
Thanks Buddy.. it worked