开发者

running .ui file in qt creator

I created a widget in Qt designer. After generating .ui file , now I want to compile it in qt creator. The .ui file is opened but run, build, debug .etc button are not enabled. How can I run t开发者_开发百科his in qt creator? Creating a project and pasting .ui file into the project directory doesn't work. Thanks.


The ui file must be added to the FORMS section of the .pro file.

FORMS+=yourfile.ui

The build step uses the /bin/uic command in the Qt directory (so you could conceivably do this manually from the command line outside of the IDE) to convert the .ui into a .h and a .cpp file (yourfile.ui becomes ui_yourfile.h).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜