Results 1 to 2 of 2

Thread: QProcess not working in some cases

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QProcess not working in some cases

    Hi,

    I am on win xp/Qt4.1.3

    I have a few labels on my mainwindow and on press i have to launch few apps.

    Here is my code

    Qt Code:
    1. void IconLabel::mousePressEvent(QMouseEvent *)
    2. {
    3. QProcess process;
    4. if( !process.startDetached(appPath) ){
    5. QMessageBox::warning(this,QString(),tr("Cannot launch app"));
    6. }
    7. }
    To copy to clipboard, switch view to plain text mode 

    While C:/WINDOWS/system32/notepad.exe launches correctly C:/Program Files/KDE PIM/kapi_me.exe does not lauch. But when I double click on the exe it works fine.

    Any ideas why this is not working ?

    Thanks a lot

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QProcess not working in some cases

    Quote Originally Posted by munna
    C:/Program Files/KDE PIM/kapi_me.exe
    Have you tried wrapping the path into quotes?
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    munna (1st August 2006)

Similar Threads

  1. problem with qprocess
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 13:30
  2. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32
  3. Qprocess
    By ioannisb in forum Qt Programming
    Replies: 5
    Last Post: 13th February 2006, 08:38
  4. speed up qprocess readstdout
    By kooshball in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2006, 09:42
  5. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15:52

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.