(qt c++) Program hangs when executed from terminal, works fine from Finder. why?
This code doesn't work when executed from the terminal like this. It does nothing if I try to start "ls" in the code, and will hang the program if I try to start "gcc"
./helloworld.app/contents/macos/helloworld
But will work fine when I double click on the app in Finder, why is that?
This code doesn't work when executed from the terminal like this. It does nothing if I try to start "ls" in the code, and will hang the program if I try to start "gcc"
./helloworld.app/contents/macos/helloworld
But will work fine when I double click on the app in Finder, why is that?
Code:
QString result = "Nothing";
//(TEST)RUN COMMAND
QProcess *proc = new QProcess(this);
proc->start("ls /avr");
proc->waitForFinished();
result = proc->readAllStandardError();