Results 1 to 4 of 4

Thread: Stop an application from GUI

  1. #1
    Join Date
    Jun 2012
    Posts
    173
    Thanks
    48
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Stop an application from GUI

    hello,

    Im using Qprocess to start and application from GUI.

    process->start("mpirun -np 12 -machinefile nodesfile myapp.exe");

    is there any way that i can use to stop myapp.exe from the gui ???

    i used process.terminate(); but it does not work.

    Please anyhelp on how can i stop this application from GUI.

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Stop an application from GUI

    Try kill() instead of terminate().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2012
    Posts
    173
    Thanks
    48
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Stop an application from GUI

    its still the same,

    when ever i run "mpirun -np # -machinefile nodes app"

    i see two process:
    mpirun -np # -machinefile nodes app
    mpiexec.hydra -np # -machinefile nodes app


    and when i used terminate or kill .. the first process mpirun is killed/terminated, but mpiexec.hydra. and the application keeps running.

    idk what should i do, i have even tried process.start("pkill mpiexec.hydra"); and did not work.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Stop an application from GUI

    Ask at some mpi forum. Your issue has nothing to do with QProcess.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Stop at exceptions
    By alizadeh91 in forum Qt Programming
    Replies: 3
    Last Post: 27th February 2013, 19:20
  2. Stop working when run my Qt application
    By lyw8120 in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2012, 01:23
  3. want to get thread to stop when application exits
    By dan146 in forum Qt Programming
    Replies: 6
    Last Post: 2nd May 2012, 23:07
  4. Replies: 12
    Last Post: 16th September 2011, 23:48
  5. how to stop QProcess in app.
    By manmohan in forum Newbie
    Replies: 5
    Last Post: 6th October 2010, 07:10

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.