How do I read from QProcess?
I have this simple C++ program: int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QProcess ps; QByteArray ba; ps.start("ls J:"); ba = ps.readAllStandardOutput(); char *someData = ba.data(); cout << "Testing QProcess ..." << endl; cout << someData << endl; cout << "done!" << endl; return a.exec(); } The output is: Testing QProcess ... done! If I run "ls J:" from Windows cmd it works. What am I missing? Use QIODevice::waitForReadyRead() in a loop, and only after that returns, then call readAllStandardOutput() . As it says in the docs, QProcess::readAllStandardOutput() will read