Building and Running Embedded Applications

Building and Running an Example

After you complete 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:

  1. Make sure that your device is powered on and connected to the development host.
  2. In Qt Creator, select File > New File or Project > Applications > Qt Quick Application > Choose.
  3. Choose a location for your new project.
  4. In the Qt Quick Component Set dialog, select Qt Quick 2.2 or Qt Quick 2.2 Boot2Qt.
  5. In the Kit Selection dialog, select the kits for your devices. You can also select the emulator kit to test running the project in the emulator.
  6. Click Next and finish the wizard.
  7. In Projects > Build & Run, select the correct kit for your connected device.
  8. To build and run the project, click

Building and Running Boot to Qt Demos

You can find the Boot to Qt demo applications in Qt Creator.

  1. Go to Welcome > Examples.
  2. Select a Boot2Qt Qt version from the drop-down list.
  3. Select a demo you want to build.
  4. In Projects > Build & Run, select the correct kit for your connected device or emulator.
  5. 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 target.path and INSTALLS variables as follows:

target.path = /data/user/qt/$$TARGET
INSTALLS   += target

Above, $$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 = *.png qml
appFiles.path  = /data/user/qt/$$TARGET
INSTALLS      += appFiles

Above, all PNG images from the application source directory, and the entire qml subdirectory are included in the deployment.

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.