【发布时间】:2017-11-21 21:18:28
【问题描述】:
所以在我现在下面的代码中,它可以毫无问题地加载 gphoto2 并添加 ---shell 开关。如何再添加一行以向该 shell 发出命令我想向 shell 发出的命令是“start-preview-stream”再次感谢!
QProcess gphoto2;
gphoto2.start("gphoto2", QStringList() << "--shell");
if (!gphoto2.waitForStarted()){
qDebug("gPhoto2 didn't start properly");
return 1;
}
qDebug("gPhoto2 Started Successfully");
调试展示
gPhoto2 Started Successfully
我也尝试了以下没有运气
QProcess gphoto2;
gphoto2.start("gphoto2", QStringList() << "--shell" << "start-preview-stream");
if (!gphoto2.waitForStarted()){
qDebug("gPhoto2 didn't start properly");
return 1;
}
qDebug("gPhoto2 Started Successfully");
【问题讨论】:
标签: c++ qt shell terminal qt-creator