如何自动化Qt moc [英] how to automate Qt moc
本文介绍了如何自动化Qt moc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须从Qt命令提示符运行以下命令:'qmake -project'然后'make',这给我带有Moc文件的调试文件夹。这是奇怪的是我的PC将生成moc_.cpp文件的唯一方式。
i have to run the following commands from Qt command prompt: 'qmake -project' then 'make' and this gives me the debug folder with the Moc file. this is strangely the only way my PC will generate the moc_.cpp file. So how can i automate the task of these commands so i dont have to use these commands again?
推荐答案
你不应该运行
- 当您开始处理项目时,运行
qmake -project
/ li>
- 当您要生成Makefiles时,运行
qmake
。 - 运行
make
。
- Run
qmake -project
when you start working on a project. - Run
qmake
when you want to generate Makefiles. - Run
make
when you want to build the project.
这篇关于如何自动化Qt moc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文