Results 1 to 2 of 2

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question [SOLVED]->How to set Path of QProcess with blank spaces !

    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: -
    Qt Code:
    1. QProcess proc;
    2. proc.start("C:/MyExamples/sample/sample.exe");
    To copy to clipboard, switch view to plain text mode 
    it works properly but when blank space comes as in "Program Files" it doesn't work as shown: -
    Qt Code:
    1. proc.start("C:/Program Files/sample/sample.exe");
    To copy to clipboard, switch view to plain text mode 

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

    Thanks in advance.
    Last edited by Krish; 7th April 2008 at 16:13.

  2. The following user says thank you to Krish for this useful post:

    Bing (19th November 2008)

  3. #2
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: How to set Path of QProcess with blank spaces !

    I used QDir::setCurrent() and its working.

    Thanks & Regards.

  4. The following user says thank you to Krish for this useful post:

    Bing (19th November 2008)

Similar Threads

  1. Replies: 3
    Last Post: 25th August 2010, 13:39
  2. Filtering blank spaces while saving file names
    By jyoti kumar in forum Qt Programming
    Replies: 1
    Last Post: 3rd September 2007, 07:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.