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?