Results 1 to 2 of 2

Thread: Opening A Terminal using QProcess

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Opening A Terminal using QProcess

    Dear Friends

    I want to open a terminal in LINUX from within QT application !
    I am trying this through QProcess
    ///////////////////////////////////////////////////////////////////////////
    QProcess process(this);
    process.setWorkingDirectory("./Grid/");
    process.start("gedit gcf.dat");

    /////////////////////////////////////////////////////////////////////////////

    But I can't see any file is opening for editing in LINUX...What am I missing in this !

    Any help would be greatly appreciated !

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Opening A Terminal using QProcess

    Hi,

    can you post the entire code?
    The QProcess::start() method returns immediatly then the QProcess instance must not go out of scope.

    To verify the correct start of new process you must catch QProcess::started() and QProcess::error() signals.

    You can also use QProcess::waitForStarted()
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. QProcess and Qtextedit problem
    By skumar434 in forum Qt Programming
    Replies: 1
    Last Post: 17th March 2009, 18:24
  2. Detect First QProcess finished in a group and kill other
    By Davidaino in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2008, 12:53
  3. QProcess and kfmclient exec problem
    By ramazangirgin in forum Qt Programming
    Replies: 5
    Last Post: 6th June 2008, 08:31
  4. QProcess and Pipes
    By KaptainKarl in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2007, 23:11
  5. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32

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.