C

Qt for Android Automotive Quick Starter Guide

Building the example from source code

The HVAC Control example can be built using the Qt tool chain as outlined below.

Build Prerequisites and Setup

Before you can build the example HVAC application, you need to ensure that the following prerequisites for the development host are met:

Now that the development host setup is complete, we can build the required applications.

Prepare the Qt for Android Automotive IF Back End Generator

The following steps will build and install extensions to Qt IF for Android Automotive.

  • Locate the Qt IF source code folder and follow steps at Installation. The following steps will build
  • Locate the source folder of the Qt for Android Automotive Module
  • Create a build folder, e.g. build_qtaa
  • Run Qt 6.2 series qt-configure-module script inside the build folder you just created, passing on the path to the Qt for Android Automotive source folder. Make sure to replace path placeholders with the valid paths.
    <path_to_qt_installation>/bin/qt-configure-module <path_to_qtaa_source>
  • build and install the Qt for Android Automotive Module (from inside build_qtaa folder):
    cmake --build .
    cmake --install .

Setting up the HVAC Example Project

  1. Open the project in Qt Creator or Design Studio. It should be in the following file location:
    path_to_qtaa_sources/examples/hvac_demos/hvac/CMakeLists.txt

    Note: the following step is only required if you are working from a repo source package. Please disregard if you have been provided with binaries.

  2. Set the build folder location outside the Qt source tree (shadow-build)
  3. Configure the project settings (Projects mode: Ctrl+5 by default)
    1. Confirm that the applicable Android Kit is chosen for compilation
    2. Set the signing of the APK Build > Build Steps > build android APK. See: How to: Signing Android Packages for more information.
    3. Choose the target , either qtro or jni. This can be quickly selected from the deploy widget, as shown below:

    Note: Manually running CMake from the HVAC project's right click context menu, will ensure the templated code is generated before the build.

Deploy the App

Click Run. This will complete the build, open the Emulator, and install the app.

See Interacting with the HVAC Control App to see what it can do.

See also HVAC Control.

Available under certain Qt licenses.
Find out more.