Results 1 to 7 of 7

Thread: Killing QProcess shell script

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Killing QProcess shell script

    No "." in your commands.
    That is only needed by the shell since the current directory is not in $PATH.

    So more something like
    Qt Code:
    1. QString rx_path = QCoreApplication::applicationDirPath();
    2. QString bin_path = rx_path + "/applications/bin";
    3. QString command = bin_path + "/application";
    4. rx_process = new QProcess;
    5. rx_process->setWorkingDirectory(bin_path);
    6. rx_process->start(command,QStringList() << "-udp" << "42003");
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

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

    mister_m (19th August 2016)

Similar Threads

  1. Replies: 1
    Last Post: 18th November 2014, 18:18
  2. Replies: 4
    Last Post: 22nd April 2014, 15:34
  3. Killing programs started with QProcess
    By AndresBarbaRoja in forum Newbie
    Replies: 0
    Last Post: 1st June 2011, 08:12
  4. QProcess: how to run shell script with password?
    By cutie.monkey in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2010, 05:43
  5. Call script shell with Qt
    By zeeb100 in forum Qt Programming
    Replies: 6
    Last Post: 26th February 2009, 09:17

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.