How to start application(path with space) using QProcess on mac OSX? -


it goes when using qprocess start program if path without space.
eg:

qprocess app; app.startdetached("open /users/test/desktop/mytest/hello.app"); 

but, doesn't work if program path containing spaces.
eg:

qprocess app; app.startdetached("open /users/test/desktop/my test/hello.app"); 

someone can me , tell me how start program space in path?
thanks!

you need use quotes in string path:-

app.startdetached("open \"/users/test/desktop/my test/hello.app\""); 

without quotes, space suggest next part of path 2nd parameter passed call open.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -