Results 1 to 3 of 3

Thread: Another QProcess Question

  1. #1
    Join Date
    Jan 2011
    Location
    Gordion
    Posts
    52
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Another QProcess Question

    Hi all. I have a slot that, runs an external windows application like this.

    Qt Code:
    1. //Header
    2.  
    3. QProcess *runEx;
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. //In class constructor
    2. ...
    3. runEx = new QProcess(this);
    4. ...
    5.  
    6. //Process starter slot
    7.  
    8. void procTests::runCustomWin()
    9. {
    10. runEx->start("test.exe");
    11. runEx->waitForStarted();
    12. }
    13.  
    14. //Slot for terminate
    15.  
    16. void procTests::stopCustomWin()
    17. {
    18. runEx->terminate();
    19. }
    20.  
    21. //Deconstructor
    22.  
    23. procTests::~procTests()
    24. {
    25. delete runEx;
    26. }
    To copy to clipboard, switch view to plain text mode 

    "test.exe" has a message dialog. When I send a signal for closing(QProcess terminate), popup works and ask user for really wants exit the application, or not.
    For exit application, user must answer that. I want to automate this process, but i cant figured it out ?
    How can I close this popup immediatelly with legal way (without force kill) and terminate process ?

    Best regards.
    Last edited by kosasker; 9th July 2012 at 12:10.

  2. #2
    Join Date
    Jan 2011
    Location
    Gordion
    Posts
    52
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QProcess Question

    Hi all. I find a solution here http://stackoverflow.com/questions/1...penvpn-cleanly.
    Which class in Qt can do this EventWaitHandle .Net class's work? Or which windows dev library? How can I handle another thread with Qt, in windows like this?
    If you have an idea, please share with me. I didnt want a code line. Just can't find the solution.

    Best regards.
    Last edited by kosasker; 13th July 2012 at 07:55.

  3. #3
    Join Date
    Jan 2011
    Location
    Gordion
    Posts
    52
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QProcess Question

    [SOLVED]

    Best Regards

Similar Threads

  1. Qprocess question
    By connect_qt in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2011, 16:32
  2. QProcess question
    By jaxrpc in forum Newbie
    Replies: 1
    Last Post: 4th June 2010, 13:10
  3. question on QProcess
    By wagmare in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2009, 07:23
  4. Question about QProcess
    By lni in forum Qt Programming
    Replies: 5
    Last Post: 27th April 2007, 23:08
  5. QProcess Question
    By Vash5556 in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2007, 16:24

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.