Results 1 to 2 of 2

Thread: QProcess::startDetached fails on Mac

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    29
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QProcess::startDetached fails on Mac

    Use the following code to launch and external program that needs to continue running after the app that launches it closes:
    QString app = "myApp";
    QProcess::startDetached(app);

    This works fine in windows but it fails on the Mac. Why? The app attempting the launch doens't hang, it just returns a false for success/failure.

    I've tried adding the .app after the name, I've even tried setting the working directory to both the apps dir and the myApp.app/Contents/MacOS directory. Still nothing.

    Any help is appreciated!

    [Added by Edit]
    I can successfully launch myApp by the following:
    QProcess::startDetached("/usr/bin/open", QStringList() << "path_to_myApp/myApp.app");

    Does it have to be like this?
    Thanks
    Last edited by sgmurphy19; 19th September 2008 at 22:30.

Similar Threads

  1. compiling hello world after fresh install fails
    By kvesi in forum Installation and Deployment
    Replies: 3
    Last Post: 19th September 2008, 13:55
  2. TableModel update fails with qt4.4.1
    By maxel in forum Qt Programming
    Replies: 0
    Last Post: 4th September 2008, 18:01
  3. Release build fails to find some resource images
    By MrGarbage in forum Installation and Deployment
    Replies: 3
    Last Post: 8th December 2007, 16:04
  4. CreateCompatibleBitmap fails in QPixmap
    By JimBrown in forum Qt Programming
    Replies: 14
    Last Post: 29th May 2007, 15:24
  5. Qt 4.1.2 Fails to build on Linux
    By rohandhruva in forum Installation and Deployment
    Replies: 6
    Last Post: 16th April 2006, 21:44

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.