Building for Host Platform
In Qt Safe Renderer 2.0, Qt Safe Renderer binaries built with Qt 5.15.10 are included in the installation.
You need to build Qt Safe Renderer yourself from sources in the following situations:
- You like to use Qt Safe Renderer with some other Qt version than Qt 5.15.10
- You are using Qt Creator 5.x
To build Qt Safe Renderer from sources, follow instructions in this topic.
Qt Safe Renderer and its examples are built via the following projects:
|Project||Description||.pro file name||Path|
|Qt Safe Renderer||When you build Qt Safe Renderer, the Qt Safe Renderer plugins and Qt Safe Tools are built and installed under the current kit in Qt Creator (that is, the Qt version that you use for building the projects).||qtsaferenderer.pro||<Qt installation directory>/Src/QtSafeRenderer-<version>|
|The Telltales example||When you build Telltales for a host platform, the desktop part of the project is built. Telltales uses layout files from the Qt Cluster example.||examples.pro||<Qt installation directory>/Examples/QtSafeRenderer-<version>/saferenderer|
|The Indicators example||Indicators demonstrates the Qt Quick Designer related functionality.||indicators.pro||<Qt installation directory>/Examples/QtSafeRenderer-<version>/saferenderer/indicators/indicators.pro|
|The Monitor example||Monitor demonstrates how you can verify the rendering output of the Indicators example.||Monitor.pro||<Qt installation directory>/Examples/QtSafeRenderer-<version>/saferenderer/monitor/monitor.pro|
|The Localization example||Localization demonstrates how you can localize content in safety-critical elements.||localization.pro||<Qt installation directory>/Examples/QtSafeRenderer-<version>/saferenderer/localization/localization.pro|
For building, you must use a Qt version that is compiled for your host platform.
To build Qt Safe Renderer and its examples for a host platform, execute the steps in Building Projects with Qt Creator for
examples.pro. Qt Safe Renderer Binaries lists the binaries that are generated in the Qt Safe Renderer build.
You must also configure Qt Creator for Qt Safe Renderer. See Configuring Qt Creator for Qt Safe Renderer.
When you build a project in Qt Creator, execute the following steps:
Open the project to Qt Creator's Edit mode:
- Start Qt Creator.
- Select File > Open File or Project and browse to a .pro file.
- Select Open.
- In the Configure Project page, choose a kit for building the project and select Configure Project.
The project is now open in Qt Creator's Edit mode.
Note: If you are building some of the examples in Qt Safe Renderer, you can skip this step.
Before building Qt Safe Renderer, add a custom build step that installs the binary file under <Qt installation directory>/<Qt version/<compiler>/bin in the Qt version that is used for building the project:
- Select a Projects mode.
- In the kit, select Build.
- Select Build Settings > Build Steps > Add Build Step > Make.
- In Make arguments, add install.
- Select the Edit mode. Your custom build step is automatically saved.
Build the project in the Edit mode by selecting Build > Build Project "<project name>".
After a successful Qt Safe Renderer build, you have the following binaries under your Qt installation:
|qtsafelayouttool||<Qt installation directory>/<Qt version>/<compiler>/bin||Qt Safe Layout Tool that is used for generating the safe layout data for Qt Safe Renderer.|
|qtsafercctool||<Qt installation directory>/<Qt version>/<compiler>/bin||Qt Safe Resource Compiler Tool that is used for generating the safe resource files for Qt Safe Renderer.|
|libqtsaferendererplugin.so (on Linux) / qtsaferendererplugin.dll (on Windows)||<Qt installation directory>/<Qt version>/<compiler>/qml/Qt/SafeRenderer||A plugin that enables Qt Quick Designer related Qt Safe Renderer functionality.|
In Qt Creator, the Qt Safe Renderer plugins require that you use a QML emulator layer that is built with the currently selected Qt. To enable the QML emulator layer, launch Qt Creator and select Tools > Options > Qt Quick > Qt Quick Designer > Use QML emulation layer that is built with the selected Qt radio button.
Qt Creator builds the emulation layer when you select the Design mode while creating the first new project with the kit. Building the emulation layer takes a while but it is done only once. For more information, see Running QML Modules in Qt Quick Designer.
Available under certain Qt licenses.
Find out more.