QT中程序的命令行执行 [英] Commandline execution of Program in QT

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

问题描述

我需要从Window命令行界面执行我的QT程序。我需要在Main()中进行哪些更改以及如何通过命令行调用它?

我的程序主要功能是..

I need to execute my QT program from Window command line interface. What changes i need to do in Main() and how i can call this through command line??
My program main function is..

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}





任何建议和帮助将不胜感激。

谢谢



Any suggestion and help would be appreciated.
Thanks

推荐答案

您可以从命令提示符启动任何Windows程序。只需在提示符处输入完整路径,然后按Return键。源代码中不得更改任何内容。
You can start any Windows program from a command prompt. Just enter the complete path at the prompt and press the Return key. There must nothing be changed in the source code.


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

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