C
QmlProject Manual (Technology Preview)
Introduction
qmlprojectexporter is a tool that allows the automatic generation of C++ code for all the resources and .qml files included in your project. The resources can be Qml files, Images, Font files, Translation files, and C++ interfaces. The main parameter the user needs to provide to qmlprojectexporter is a .qmlproject file. This file defines the project's structure and might depend on other .qmlproject module files.
qmlproject files
The syntax of .qmlproject file is based on the same syntax as Qml documents. They are used to describe the project structure. Similar to Qml documents, the .qmlproject files are composed of an import section followed by a hierarchy of Nodes or Objects, starting from the root Node (Project in this case), with each Node having a predefined set of properties. The import section consists mainly of "import QmlProject 1.3" which indicates that this is a .qmlproject file and specifies which version of the API should be used.
Nodes
Each Node configures a specific part of a project (Qml files, Images, Modules, among others). Some nodes can be defined multiple times in the Project root node, such as ImageFiles. Others should be defined only once, for example, MCU.Module.
Warning: Currently, the depth of the .qmlproject file hierarchy is two, meaning the Project node is the only one containing nodes. Other nodes can only define properties..
Properties
Properties in .qmlproject files can be considered as configuration parameters. Each node has a predefined set of configurations. Users can assign other configurations or properties from the MCU.Config node. When not found in its default Node (such as ImageFiles), those configuration properties are prefixed with "MCU.". For more information, see MCU.Config.
Nodes
- FontConfiguration
- FontFiles
- ImageFiles
- InterfaceFiles
- MCU.Config
- MCU.Module
- ModuleFiles
- Project
- QmlFiles
- TranslationFiles
Project
A list of paths where the extra header files live. | |
The main QML source file for the application. | |
The root path of the project |
QmlFiles
A list of strings, specifies which variants to use when picking qml files. | |
Enables copying the QML files into the output directory | |
A directory contaning the QML files | |
A list of QML files. |
ImageFiles
Defines the base path for the assets. | |
A list of strings, specifies which variants to use when picking image files. | |
Adds a common prefix to the file's URI. | |
Defines the image cache policy. | |
Store image in compressed format. | |
Set the preferred pixel format for the image assets. | |
Enable optimizations for rotating the image at runtime. | |
Enable optimizations for scaling the image at runtime. | |
Define the asset runtime allocation type. | |
Define the asset's storage section. | |
Adds a directory containing the image assets. | |
A list of image assets. |
FontFiles
Adds the default font files from Qt for MCUs to the project. | |
A list of strings, specifies which variants to use when picking font files. | |
Adds all the font files in the given directory. | |
A list of the font files to be added. |
TranslationFiles
A list of strings, specifies which variants to use when picking translation files. | |
Indicates whether to include or exclude source language strings. | |
Adds a directory containing the translation files. | |
Adds the list of the translations files. |
FontConfiguration
Generates glyphs automatically. | |
Enables rendering complex scripts | |
Sets a default font family for Text items. | |
Sets a default font quality for Text items. | |
Controls the font cache buffer preallocation. | |
Controls font cache priming. | |
Set maximum cache size used by font engine. | |
Selects a font engine for the project. | |
Controls font file caching. | |
Control copying pre-rasterized glyph data to RAM. | |
Configures the resource storage section for the font files. | |
Controls preallocation of the heap buffer used by the font engine. | |
Defines a maximum heap size for the font engine. | |
Controls using vector outlines for text rendering. | |
Defines a policy to copy pre-rasterized glyph data to RAM. | |
Defines the runtime allocation type to be used to copy glyph data. | |
Configure the resource storage section used for pre-rasterized glyph data. | |
Set the maximum paragraph size. | |
Combine the glyphs for a StaticText item into a single image. |
MCU.Config
Selects the style of the Qt Quick Controls. | |
Indicates if JavaScript bytecode should be included. | |
Indicates whether to add #line directives. | |
A list of strings, specifies which variants to use by default for nodes in the qmlproject file. | |
Defines the maximum resource cache size for a runtime allocation type. | |
MCU.Config.platformAlphaCompressedLosslessResourcePixelFormat | Defines a default format for lossless compression of the transparent image assets. |
The default pixel format for transparent image assets. | |
Defines the minimum alignment for image data. | |
MCU.Config.platformOpaqueCompressedLosslessResourcePixelFormat | Defines a default pixel format for lossless compression of opaque image assets. |
Defines a default pixel format for opaque image assets. | |
Defines required pixel alignment for images. | |
Defines the image cache policy. | |
Indicates if the image assets are stored in compressed format. | |
Defines a pixel format for rendering the image assets. | |
Enable optimizations for rotating the image at runtime. | |
Enable optimizations for scaling the image at runtime. | |
Define the asset runtime allocation type. | |
Defines the asset storage section. |
MCU.Module
Generates a type information file for the module. | |
Defines a URI for the module. |
ModuleFiles
A list of strings, specifies which variants to use when picking module files. | |
A list of Qt Quick Ultralite modules that the project should linked to. | |
Adds a directory containing the QML module files. | |
Adds a list of the qmlproject files. |
InterfaceFiles
A list of strings, specifies which variants to use when picking header files. | |
Lists the QML imports. | |
Provides a directory containing the C++ interface files. | |
List the C++ interface files. |
Commandlines
qmlprojectexporter
A path to BoardDefaults.qmlprojectconfig file holding default property values of a board. | |
Override controls style | |
A flag to enable exporting configuration information for build systems. | |
Enable exporting cpp sources. | |
Enable or disable exporting modules within a project. | |
List the commandline parameters. | |
Comma separated list of include dirs. | |
The output directory. | |
Specify the path where the mapping of custom qml modules to default modules are listed . | |
Path to rc.exe (for MSVC toolchain). | |
A comma-separated list of selectors to pick a project variant. | |
An identifier of the toolchain that will be used for compiling the generated files. | |
Enable updating the translation files. | |
Print calls to other tools to standard output. | |
The path to the qmlproject file. |
Available under certain Qt licenses.
Find out more.