Qt Creator 如何编译窗体的 moc cpp h文件
我原先是用VS2012+Qt5的插件开发Qt程序,由于用的是vs2012的试用版,现在vs2012过期了,我于是把项目挪到Qt Creator下继续开发,但是我发现原来在VS2012下,一个窗体UI会被编译成*.cpp, *h, moc_*.cpp等文件,而且有专门的右键菜单可以单独编译选定的UI,但是在Qt creator环境下,我没有找到有对于的右键菜单,有人说可以用uic命令行,但是我不知道如何用uic同时生产*.cpp, *h, moc_*.cpp
C:\Users\ehaiqhe>uic -h
Qt User Interface Compiler version 5.1.1
Usage: uic [options] <uifile>
-h, -help display this help and exit
-v, -version display version
-d, -dependencies display the dependencies
-o <file> place the output into <file>
-tr <func> use func() for i18n
-p, -no-protection disable header protection
-n, -no-implicit-includes disable generation of #include-directives
for forms generated by uic3
-g <name> change generator
[解决办法]