从 .ui 文件生成 .h 和 .cpp [英] Generate .h and .cpp from .ui file
本文介绍了从 .ui 文件生成 .h 和 .cpp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有 about.ui 文件.如何从我的 .ui 文件制作 "about.h" 和 "about.cpp"?我也必须创建一个 .moc 文件?我如何在创建之后编译这个以查看是否一切正常?
Suppose I have the file about.ui. How can I make the "about.h" and the "about.cpp" from my .ui file? I have to create a .moc file too? How can I compile this after the creaton to see if all ocurred correctly?
推荐答案
如果自动生成不起作用(如我的情况),您可以使用 uic 手动生成头文件.uic file.ui >文件.h
If automatic generation does not work (like in my case) you can use uic to generate the header file manually. uic file.ui > file.h
这篇关于从 .ui 文件生成 .h 和 .cpp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文