Building and Running Embedded Applications
Building and Running an Example
After you have completed the installation and configuration steps for Qt for Device Creation and the target devices, you can test the setup by creating a simple Qt Quick application and running it on the device or on the emulator.
Note: When creating the project, you can use the default values defined in the wizard pages.
After the project wizard is closed, build and run the project:
- In Projects > Build & Run, select the appropriate kit for your connected device or emulator.
- To build and run the project, click .
The project will be built and deployed to your target device or emulator.
Building and Running Boot to Qt Demos
You can find the Boot to Qt demo applications in Qt Creator.
- Go to Welcome > Examples.
- Select a Boot2Qt Qt version from the drop-down list.
- Select a demo you want to build.
- In Projects > Build & Run, select the correct kit for your connected device or emulator.
- To build and run the project, click
Setting Up an Already Existing Project for Deployment
New Qt Quick application projects generated by Qt Creator always have the correct settings for deployment on the device or emulator. However, other projects need some changes. This includes projects created using the File > New File or Project > Applications > Qt Widget Application template.
As a general rule, application binaries and resources are deployed to the
/data/user/qt/<APPLICATION_NAME> directory. Therefore, the
path variable for the
INSTALLS targets needs to be adjusted accordingly in .pro files.
Open the .pro file and define the
INSTALLS variables as follows:
target.path = /data/user/qt/$$TARGET INSTALLS += target
$$TARGET expands to the application target (executable) name.
Deploying Application Resources
If the application depends on additional resources (such as QML files and images), you need to deploy them as well. For example:
appFiles.files = \ image1.png \ image2.png \ qml appFiles.path = /data/user/qt/$$TARGET INSTALLS += appFiles
Above, two PNG images from the application source directory, and the entire qml subdirectory are included in the deployment.
Note: From Qt Creator 4.2.0 onwards, wildcards are not supported.
Alternatively, the files used by the application can be stored into the application executable using the Qt resource system. This way, simply deploying the application binary is all that's required.
Using Qt Quick Controls
The Boot to Qt stack supports the full set of Qt modules, including Qt Quick Controls. However, a number of UI controls from that module are implemented in a way that's currently not supported:
These controls attempt to open a new top-level window, while in Boot to Qt, Qt Quick applications can only have a single fullscreen window existing at a time.
See the related entry in Troubleshooting.
Available under certain Qt licenses.
Find out more.