Results 1 to 20 of 21

Thread: QProcess disconnect trouble

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: QProcess disconnect trouble

    From post 7:
    Qt Code:
    1. disconnect(process, SIGNAL(error(QProcess::ProcessError)), 0, 0);
    2. disconnect(process, SIGNAL(finished(int exitCode, QProcess::ExitStatus)), 0,0);
    3. process->kill();
    To copy to clipboard, switch view to plain text mode 
    should not list the name of the int parameter at line 2. Perhaps this leaves the finished() signal still connected?

    Have you tried calling QProcess::terminate() (close gracefully) rather than QProcess::kill() (close with mallet)? I cannot imagine many Windows applications that ignore the WM_CLOSE message sent by terminate()

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

    wally (6th April 2010)

Similar Threads

  1. Disconnect slot when another is being connected
    By holst in forum Qt Programming
    Replies: 4
    Last Post: 8th September 2009, 09:49
  2. auto-disconnect in ~QGraphicsItem?
    By Lykurg in forum Qt Programming
    Replies: 2
    Last Post: 22nd July 2008, 08:14
  3. QTcpSocket not recognizing disconnect
    By jimroos in forum Qt Programming
    Replies: 3
    Last Post: 6th September 2007, 15:31
  4. How to make QHttp detect a disconnect?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2007, 10:07
  5. qsqldatabase does not sense db disconnect
    By rburge in forum Qt Programming
    Replies: 0
    Last Post: 9th March 2006, 18:59

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.