C
Qt Safe Renderer Tools
Qt Safe Renderer provides Qt Safe Layout Tool and Qt Resource Compiler Tool that generate safe data for your project. Qt Safe Config Tool post-processes the safe data asset and generates the C structure from the data for output verification.
Qt Safe Layout Tool
The Qt Safe Layout Tool generates safe layout data for Qt Safe Renderer.
The command to start the tool is: qtsafelayouttool [options] source
.
The following table summarizes the available options for the Qt Safe Layout Tool:
Options | Description |
---|---|
-h, --help | Display help on command line options. |
-v, --version | Display the Qt Safe Renderer version. |
-o, --target-directory <directory> | Copy generated layouts to the specified directory. |
-r, --resource-file <resource> | Parse image data from the specified resource file. |
-f, --font-directory <directory> | Set the font directory. |
-fps <frame-rate> | Set the target animation <frame-rate>. The default frame rate per second is 64. |
-d | Enable debug information. |
Arguments | Description |
source | Specify a QML file that is parsed. |
Generating Safe Layout Data
After you have enabled Qt Safe Layout Tool in your Qt Quick project, the following safe layout data is generated when you build the project:
- An .srb file is generated for each static safe QML type that you have added to the canvas. The file contains the compressed bitmap data that Qt Safe Renderer requires for rendering the UI element defined with the safe QML type.
- An .srt file is generated for each dynamic SafeText QML type that you have added to the canvas. The file contains the following metadata for a layout: text layout width and height, a file name of a font, Cyclic redundancy check (CRC) in a font file, a horizontal and vertical alignment, a text and a text color.
- A .qpf2 file is generated for each font type that you use in the dynamic SafeText QML type. The file contains the font data.
- An .srl file is generated for each Qt Quick UI form that contains safe QML types. The file contains the raw layout data.
Qt Safe Resource Compiler Tool
The Qt Safe Resource Compiler Tool generates safe resource files for Qt Safe Renderer.
The command to start the tool is: qtsafercctool [options] inputs
.
The following table summarizes the available options for the Qt Safe Resource Compiler Tool:
Options | Description |
---|---|
-h, --help | Display help on command line options. |
-v, --version | Display the Qt Safe Renderer version. |
-o, --output <file> | Write output to file rather than stdout. |
-t, --temp <file> | Use the specified temporary file for big resources. |
--name <name> | Create an external initialization function with the specified name. |
--root <path> | Prefix resource access path with root path. |
--compress <level> | Compress input files by the specified level. |
--no-compress | Disable all compression. |
--threshold <level> | Threshold to consider compressing files. |
--binary | Output a binary file for use as a dynamic resource. |
--pass <number> | Pass the specified number for big resources. |
--namespace | Disable the namespace macros. |
--verbose | Enable the verbose mode. |
--list | List only .qrc file entries, do not generate code. |
--list-mapping | Output only a mapping of resource paths to file system paths defined in the .qrc file, do not generate code. |
--project | Output a resource file containing all files from the current directory. |
--format-version <number> | The RCC format version to write. |
--safety | The RCC format is specific to Qt Safe Renderer. Sets compression and binary off. |
Arguments | Description |
inputs | Input files (*.qrc). |
Qt Safe Config Tool
Qt Safe Config Tool post-processes the safe data asset and generates the C structure from the data for output verification.
The command to start the tool is: qtsafeconfigtool [options] inputs
.
The following table summarizes the available options for the Qt Safe Config Tool:
Options | Description |
---|---|
-?, -h, --help | Display help on command line options. |
--help-all | Displays help including Qt specific options. |
-v, --version | Displays version information. |
-o, --outputdir <dir> | Write output to <dir>. |
--xml | Generate the XML file from the data. |
Arguments | Description |
inputs | Input layout files (*.srl). |
Available under certain Qt licenses.
Find out more.