目录
一、QProcess 简述:
QProcess 可以启动其他进程 exe 软件,那么在本进程中,可否获得其他进程 (exe) 的输出信息吗?
答案是可以的,如何做呢?我们来看一下:
二、QProcess 函数与应用
1、连接信号槽函数
QProcess myProcess;
connect(&myProcess, &QProcess::readyRead,
this, &QMyProcess::showResult);
connect(&myProcess, &QProcess::stateChanged,
this, &QMyProcess::showState);
connect(&myProcess, &QProcess::errorOccurred,
this, &QMyProcess::showError);
connect(&myProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(showFinished(int, QProcess::ExitStatus)));
2、启动 Process
这里的 “/c”

最低0.47元/天 解锁文章
755

被折叠的 条评论
为什么被折叠?



