Hello, i hava a problem with QProcess.
I made this connection:
Qt Code:
  1. connect ( myProcess , SIGNAL ( finished ( int , QProcess::ExitStatus ) ) , this , SLOT ( processVNCFinished ( int , QProcess::ExitStatus ) ) );
To copy to clipboard, switch view to plain text mode 

so when the process finish i call the slot processVNCFinished.
This is my processVNCFinished slot:
Qt Code:
  1. void mainWindow::processVNCFinished ( int exitCode , QProcess::ExitStatus exitStatus )
  2. {
  3. if ( exitStatus == QProcess::CrashExit )
  4. {
  5. qDebug () << "VNC client program crashed\n";
  6. }
  7. else if ( exitCode != 0 )
  8. {
  9. qDebug () << "VNC client program failed\n";
  10. }
  11. else
  12. {
  13. qDebug () << "VNC client program OK!\n";
  14. }
  15.  
  16. }
To copy to clipboard, switch view to plain text mode 

i'm going to call vncviewer and when i close the vncviewer window clicking on the "X" on the right top window i get an exitCode = 1. Shouldn't i receive a 0 like exitCode?
In this way i always fall into qDebug () << "VNC client program failed\n" and instead i'd like to go into qDebug () << "VNC client program OK!\n".
Thx