我使用的是qt 3.3
使用QProcess的代码段是:
QString command("./client_file");
process = new QProcess(command);
process->writeToStdin(sql_values);
//sql_values是.client_file的输入
bool successful = process->start();
// if(!(process->launch(sql_values)))
if(!successful )
{
QMessageBox::critical( 0,
tr("Fatal error"),
tr("Could not start the ./client_file command."),
tr("Quit") );
return;
}
/* while(process->isRunning () )
{
cout << "process isRunning" << endl;
}
*/
connect( process, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
但在程序运行过程中发现readFromStdout()) 根本就没有运行,哪位前辈给指点一下问题出在哪里?