c++ - Qt - QProcess is not working -


i try launch internet explorer, use below code

qprocess * process=new qprocess(this); qstring temp="c:\\program files\\internet\ explorer\\iexplore.exe"; process->startdetached(temp.tostdstring().c_str()); 

but doesn't work.

try:

qprocess * process=new qprocess(this); qstring temp="\"c:\\program files\\internet explorer\\iexplore.exe\""; process->startdetached(temp); 

you need use escaped quotes since path has space in it, or possibly escape spaces (you missed program\ files in code posted).


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -