PDA

View Full Version : [SOLVED]->How to set Path of QProcess with blank spaces !



Krish
7th April 2008, 14:51
Hello! Friends,
I have tried to start a QProcess in my gui but had a problem to start it with the blank space in its path. For example when i try following code: -


QProcess proc;
proc.start("C:/MyExamples/sample/sample.exe");

it works properly but when blank space comes as in "Program Files" it doesn't work as shown: -


proc.start("C:/Program Files/sample/sample.exe");


Can anyone please help me out in this. I will be grateful:)

Thanks in advance.

Krish
7th April 2008, 15:12
I used QDir::setCurrent() and its working.

Thanks & Regards.