Resource Compiler (rcc)

The rcc tool is used to embed resources into a Qt application during the build process. It works by generating a C++ source file containing data specified in a Qt resource (.qrc) file.

Usage:

rcc [options] <inputs>

RCC accepts the following command line options:

OptionArgumentDescription
-ofileWrite output to file rather than to stdout.
-namenameCreate an external initialization function with name.
-thresholdlevelSpecifies a threshold 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.
-compresslevelCompress 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. The default value for level is -1, which means use zlib's default compression level.
-rootpathPrefix the resource access path with path. The default is no prefix.
-no-compressDisable compression.
-binaryOutput a binary file for use as a dynamic resource.
-versionDisplay version information.
-helpDisplay usage information.
-t, --temp <file>Use temporary <file> for big resources.
--namespaceTurn off namespace macros.
--verboseEnable verbose mode.
--listOnly list .qrc file entries, do not generate code.
-projectOutput a resource file containing all files from the current directory.

See also The Qt Resource System for more information about embedding resources in Qt applications.

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.