QT:运行带有参数的程序 [英] QT: running a program with arguments

查看:843
本文介绍了QT:运行带有参数的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想运行一个名为"iphuc"的程序,并在Windows cmd中执行此命令"-qo enterrecovery".我通过编写"iphuc -qo enterrecovery"手动完成此操作.但请在跨平台代码的QT中使用它
请帮忙.
预先感谢.

Hey all,

I want to run a program called "iphuc" and excute this command "-qo enterrecovery" in windows cmd. I do it manually by writing "iphuc -qo enterrecovery". But please i want it in QT with a cross platform code
please help.
Thanks in advance.

推荐答案

您可以创建 QApplication 对象,并向其传递参数.然后,您可以使用arguments()函数获取它们.
You can create a QApplication object and pass it the arguments. Then you can get them using the arguments() function.


这篇关于QT:运行带有参数的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆