Results 1 to 5 of 5

Thread: ask: how to start app within app

  1. #1
    Join Date
    Feb 2008
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question ask: how to start app within app

    Hi...all

    please advice , I need to start a qt application from another qt application..as far as I know(correct me if I'm wrong) if I used Qprocess if main application closed so the started/external program will close too...I need to keep it running even if I close the main apps


    rgds

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ask: how to start app within app


  3. #3
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: ask: how to start app within app

    I suppose if you know the path to executable you can also use QDesktopServices::openUrl
    C++ & AMD forever

  4. #4
    Join Date
    Feb 2008
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: ask: how to start app within app

    Quote Originally Posted by marcel View Post
    Hi.. Marcell
    thanks for your sugesstion but currently I'm using qt 3.... I can't find QProcess::startDetached...is there any similar function in qt 3

  5. #5
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ask: how to start app within app

    QProcess::~QProcess ()
    Destroys the instance.

    If the process is running, it is not terminated! The standard input, standard output and standard error of the process are closed.

    You can connect the destroyed() signal to the kill() slot, if you want the process to be terminated automatically when the instance is destroyed.
    Seems that application won't be closed automatically when your application closes.

    On Qt 4
    QProcess::~QProcess () [virtual]
    Destructs the QProcess object, i.e., killing the process.
    Note that this function will not return until the process is terminated.
    That's because startDetached() method was added.

    So in your case QProcess(qt3) should do exactly what you need.

    regards
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

Similar Threads

  1. start application: Why this error and how to solve it?
    By Colx007 in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2008, 15:22
  2. Want to start work with QT GUI
    By atil in forum Newbie
    Replies: 5
    Last Post: 20th November 2007, 09:17
  3. I start a external fortram program, how to terminate?
    By dolphins in forum Qt Programming
    Replies: 3
    Last Post: 28th October 2007, 13:07
  4. Questions about kill() and start() of QProcess
    By mp33919 in forum Qt Programming
    Replies: 5
    Last Post: 23rd June 2007, 13:00
  5. I need a help dialog, how do I start?
    By johnny_sparx in forum Newbie
    Replies: 1
    Last Post: 23rd May 2006, 23:00

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.