RCC (资源编译器)

rcc 工具被用于在构建过程中把资源嵌入 Qt 应用程序。它通过生成包含在 Qt 资源 .qrc 文件中的指定数据的 C++ 源文件工作。

用法:

rcc [options] <inputs>
					

RCC (资源编译器) 接受以下命令行选项:

选项 Argument 描述
-o file 写入输出到 file 而不是到标准输出。
-name name 创建外部初始化函数采用 name .
-threshold level 指定阈值 level (as a percentage) to use when deciding whether to compress a file. If the reduction in the file size is greater than the threshold level , it is compressed; otherwise, the uncompressed data is stored instead. The default threshold level is 70%, meaning that compressed files which are 30% or less of their original size are stored as compressed data.
-compress level Compress input files to the given compression level , which is an integer in the range 1 to 9. Level 1 does the least compression but is fastest. Level 9 does the most compression but is slowest. To turn off compression, use -no-compress 。默认值对于 level is -1, which means use zlib's default compression level.
-root path 前缀资源访问路径采用 path 。默认无前缀。
-no-compress 禁用压缩。
-binary 输出二进制文件为用作动态资源。
-version 显示版本信息。
-help 显示用法信息。
-t, --temp <file> 使用临时 <file> 为大资源。
--namespace 关闭名称空间宏。
--verbose 启用冗余模式。
--list 仅列出 .qrc 文件条目,不生成代码。
-project 输出包含所有文件 (来自当前目录) 的资源文件。

另请参阅 Qt 资源系统 了解把资源嵌入 Qt 应用程序的更多信息。