Advertisement

在QT中QProcess的使用示例(完整代码)

阅读量:

author: hjjdebug
date: 2024年 02月 03日 星期六 12:16:01 CST
description: QT中QProcess 的使用(完整代码)
目的: 用最简单的程序了解QT对象QProcess的使用


要求, 用QT编写程序,实现对test_print 程序的调用
test_print 是如下向控制台输出1-99个数字然后就退出的程序. 这个程序就自己实现一下吧。

或者看后面的附录:
./test_print
1
2
3
4
5
6
7
8
9

qt 对进程的调用可以使用QProcess 类来实现
主程序还是一样的简单,我们创造一个QObject 子对象就可以了
$ cat main.cpp
#include
#include <unistd.h> //for gettid()
#include "myclass.h"

QApplication* gApp;
int main(int

全部评论 (0)

还没有任何评论哟~