Im using this code in Qt to get output of a cmd commend
QProcess c_output;
c_output.start("some-exe", QStringList() << "param1" << "param2" << "param3...");
if (!c_output.waitForStarted())
std::cout << false;
c_output.write("...");
c_output.closeWriteChannel();
if (!c_output.waitForFinished())
std::cout << false;
its work just good.
with this code i can access output with c_output.readAll()
, but problem is this code wait until cmd finish exec ... and then give all output in c_output.readAll()
, i want to get output in realtime and show them in gui of my program
my mean is my commend print multiply lines after exec, i want to show all of them one by one in my program and not wait for it to finish.