I have a similar problem, but it's not caused by a trailing space.
This works:
proc->start( "/home/user/path/to/prog/myprogram.exe -a -b -c" );
proc = new QProcess( parent );
proc->start( "/home/user/path/to/prog/myprogram.exe -a -b -c" );
To copy to clipboard, switch view to plain text mode
This doesn't work:
proc->setWorkingDirectory( "/home/user/path/to/prog" );
proc->start( "myprogram.exe -a -b -c" );
proc = new QProcess( parent );
proc->setWorkingDirectory( "/home/user/path/to/prog" );
proc->start( "myprogram.exe -a -b -c" );
To copy to clipboard, switch view to plain text mode
Adding a trailing '/' to the path in setWorkingDirectory makes no difference.
The weirdest thing is, if I change "myprogram.exe" to "ls", for instance, then "ls" works and returns the contents of /home/user/path/to/prog
What am I missing ?
Bookmarks