The
rcc
工具被用於在構建過程中把資源嵌入 Qt 應用程序。它通過生成包含在 Qt 資源 .qrc 文件中的指定數據的 C++ 源文件工作。
用法:
rcc [options] <inputs>
RCC (資源編譯器) 接受以下命令行選項:
| 選項 | 自變量 | 描述 |
|---|---|---|
-o
|
file
|
寫入輸齣到
file
而不是到 stdout (標準輸齣)。
|
-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 應用程序的更多有關信息。