C++ (Qt)class CProcessThread: public QThread{ Q_OBJECT QProcess * process;////// public slots: void on_process_finished(int code, enum QProcess::ExitStatus status);} CProcessThread::CProcessThread( const QString& appStr, const QStringList& listParam ){ process= new QProcess(); process->setObjectName(QString::fromUtf8("process")); QMetaObject::connectSlotsByName(this);} void CProcessThread::on_process_finished( int code, enum QProcess::ExitStatus status){ qDebug()<<QString("finish %1 Thread").arg(m_appStr)<<process->exitCode()<<process->exitStatus()<< process->errorString()<<process->error(); emit finished(code, status, this);}
process= new QProcess();
C++ (Qt) void on_process_finished(int code, enum QProcess::ExitStatus status);