mrfrankj:可能我没描述清楚,Qt是跑在Ubuntu16 或 Win10上面,而相机端是Ubuntu os,PC端和相机端之间涉及文件拷贝(scp),当PC端是Win10时,有时拷贝失败.
至于代码,主要使用QProcess运行linux命令:
"scp -v -o StrictHostKeyChecking=no root@%s:/usr/local/edge_version ." ..
(2019-10-16 08:54) 
char strCmd[128];
memset(strCmd,0,128);
sprintf(strCmd, "scp -v -o StrictHostKeyChecking=no root@%s:/usr/local/edge_version .", "10.0.0.2");
ps5 = new QProcess(this);
connect(ps5,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(slot_read_FW_done()));
ps5->start(QString::fromStdString(strCmd));