Results 1 to 14 of 14

Thread: QProcess object not emitting finished(int) signal

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default QProcess object not emitting finished(int) signal

    Hello,

    I have a weird trouble. I have created a QProcess object and started an external program. But... when program finishes, object is not emitting finished signal. How is this possible? What can I do to workaround this?

    My code example:
    Qt Code:
    1. launcher::launcher(QWidget *parent, Qt::WFlags flags)
    2. : QDialog(parent, flags)
    3. {
    4. QProcess program;
    5. Sleep(3000);
    6. program.start("/path/to/my/program.exe");
    7. connect(&program, SIGNAL(finished(int)), this, SLOT(OnExit()));
    8. }
    9.  
    10.  
    11. void launcher::OnExit()
    12. {
    13. QMessageBox::information(this,"","Izhod");
    14. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 14th November 2008 at 22:39. Reason: missing [code] tags

Similar Threads

  1. Replies: 3
    Last Post: 15th April 2007, 19:16
  2. Replies: 2
    Last Post: 17th May 2006, 21:01
  3. 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.