Qt的工具

Qt提供了几种命令行和图形工具来减轻和加速开发过程。每一种工具都在这里列出,并给出它们的文档的链接。 Qt设计器——可视化地设计视窗 Qt语言学家,lupdate和lrelease——翻译应用程序使之能够进入国际市场 Qt助手——快速地发现你所需要的帮助 qmake——由简单的宇平台无关的项目文件生成Makefile qembed——转换数据,比如把图片转还为C++代码 qvfb——在桌面上运行和测试嵌入式应用程序 makeqpf——为嵌入式设备提供预先做好的字体 moc——元对象编译器 uic——用户界面编译器 UserInterfaceCompiler (uic) 用户接口编译器(UIC) This page documents the User Interface Compiler for the Qt GUI application framework. The uic reads a user interface definition (.ui) file in XML as generated by Qt Designer and creates corresponding C++ header or source files. It can also generate an image file to embed raw image data in C++ source code. 这页文档介绍QT图形编程应用框架下的UIC(User Interface Compiler),UIC读取用户接口定义文件(.UI),后缀是.ui这种XML格式文件是由qt另外一个工具Qt Desiger 产生的,UIC工具从 .ui文件产生C++头文件和实现文件,同时也能生成图像的C++代码,这种代码是embed raw image data格式数据。 UIC的使用 File Generation Options Generate declaration: 产生声明文件,就是头文件.h 命令:uic [options] Generate implementation: 产生实现文件,就是.cpp文件 命令:uic [options] -impl - name of the declaration file Generate image collection: 产生图像格式C++代码 命令:uic [options] -embed ... - project name - image files For convenience, uic can also generate declaration or implementation stubs for subclasses. Generate subclass declaration: 产生子类声明。 命令:uic [options] -subdecl - name of the subclass to generate - declaration file of the baseclass Generate subclass implementation: 产生子类实现文件 命令:uic [options] -subimpl - name of the subclass to generate - declaration file of the subclass General Options 标准操作码,Options的所有格式 -o file - write output to 'file' rather than to stdout. -nofwd - omit forward declarations of custom classes in the generated header file. This is necessary if typedef classes are used. -tr func - use func(sourceText, comment) rather than trUtf8(sourceText, comment) for internationalization. Usage uic is almost always invoked by make (1), rather than by hand. Here are useful makefile rules if you only use GNU make: %.h: %.ui uic $< -o $@ %.cpp: %.ui uic -impl $*.h $< -o $@ If you want to write portably, you can use individual rules of the following form: NAME.h: NAME.ui uic $< -o $@ NAME.cpp: NAME.ui uic -impl $*.h $< -o $@ You must also remember to add NAME.cpp to your SOURCES (substitute your favorite name) variable and NAME.o to your OBJECTS variable. (While we prefer to name our C++ source files .cpp, the uic doesn't care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.)
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值