【发布时间】:2018-12-31 09:46:38
【问题描述】:
我在我的 Qt 应用程序中运行一个名为 agent.exe 的外部可执行文件,如下所示:
// header
QProcess *m_agent;
// source
m_agent = new QProcess(this);
QString agentPath = QCoreApplication::applicationDirPath() + "/agent.exe";
if (QFileInfo::exists(agentPath) && QFileInfo(agentPath).isFile()) {
m_agent->start(agentPath);
} else {
qDebug() << __func__ << "Executable does NOT exist\n";
}
我的agent.exe 在QProcess * 上运行良好,但问题是我看不到它的输出日志。有没有办法查看它的日志?
【问题讨论】:
-
输出日志是什么意思?您是指控制台输出还是 .log 文件?
-
@Gurushant 是的,我的意思是控制台输出