Reputation: 7448
I'm starting an external tool using QProcess::startDetached and it doesn't start. The log tells:
... LOG:...Starting...: C:/Program Files (x86)/AESKU.SYSTEMS/HELIOS/mytool.exe --minimize
... WARNING...failed...: C:/Program Files (x86)/AESKU.SYSTEMS/HELIOS/mytool.exe --minimize
Starting the tool in terminal using
"C:\Program Files (x86)\AESKU.SYSTEMS\HELIOS\mytool.exe" --minimize
works.
So doesn't it start because of spaces in "Program Files (x86)" or because of wrong slashes?
In C++ I use the call:
if(!QProcess::startDetached( wlc_cmdLine ))
...
Upvotes: 2
Views: 506
Reputation: 7448
OK, No I've found out. Both versions of startDetached work:
QProcess::startDetached( some_command_line_string_with_args_but_without_spaces );
QProcess::startDetached( some_command_line_string_without_args_but_with_spaces , QStringList()<<"--myarg" );
In both versions, even on windows the slashes instead of native back-slashes work fine.
Upvotes: 0