{
QString path2 = "../linkExe/ScreenCapRecord/Tools/start/AndroidScreenCap.exe";
QProcess *process = new QProcess(this);
QString program = path2;
connect(process, &QProcess::errorOccurred, this, &Widget::onProcessError);
// 启动程序
process->start(program);
}
void Widget::onProcessError(QProcess::ProcessError error)
{
qDebug() << "Process error:" << error;
}
获取相对路径的方法 http://t.csdnimg.cn/LxDiv