Configuring a toolchain in Qt Creator

After defining a QNX device to represent your target system, you must set up a toolchain in Qt Creator. The toolchain defines the build and run environment based on the QNX QDF installation and the compiler, debugger, and target device configurations.

To configure a toolchain in Qt Creator:
  1. In the IDE, select the Tools menu, then click Options to open the Options dialog.
  2. Choose Build & Run in the left-side menu, click the Qt Versions tab in the main viewing area, then click the Add... button on the right side.
  3. In the file selector shown, navigate to the host directory containing the qmake version that you're using, select qmake.exe (on Windows) or qmake (on Linux), then click Open.
    The directory containing this utility is QT_BASEDIR\Qt-5.3.1-variant\bin, where variant is x86 or armle-v7; on Linux, the directory separators would be forward slashes (/).
    The Options dialog then displays additional fields for configuring the selected Qt version.
  4. At the bottom of the dialog, on the line that reads QNX Software Development Platform, click Browse....
  5. In the file selector that the IDE displays, navigate to the SDP installation location (referred to as DEFAULT_SDP_PATH in this document) and click Select Folder.
    The QNX Software Development field now lists the directory containing the QNX SDP 6.6 installation on your host system.
  6. Click the Compilers tab, click the Add button on the right side, then select QCC from the dropdown list.
    The Options dialog displays additional fields at the bottom for configuring the newly added compiler.
  7. Fill in the compiler fields:
    1. In the Name field, enter QNX SDP 6.6 QCC.
    2. On the Compiler path line, click Browse... to open the file selector. On Windows, navigate to DEFAULT_SDP_PATH\host\win32\x86\usr\bin and choose qcc.exe. On Linux, navigate to DEFAULT_SDP_PATH/host/linux/x86/usr/bin and choose qcc. Click Open to confirm the setting.
    3. On the NDK/SDP path line, click Browse... to open the file selector, navigate to DEFAULT_SDP_PATH, then click Select Folder.
    4. In the dropdown list for ABI, select arm-linux-generic-elf-32bit.
  8. Click the Apply button in the bottom right corner to save these settings.
  9. Click the Debuggers tab, then click the Add button on the right side.
    The Options dialog displays additional fields at the bottom for configuring a new debugger.
  10. Fill in the debugger fields:
    1. In the Name field, enter QNX SDP 6.6 GDB.
    2. On the Path line, click Browse... to open the file selector. On Windows, navigate to DEFAULT_SDP_PATH\host\win32\x86\usr\bin and choose ntoarmv7-gdb.exe. On Linux, navigate to DEFAULT_SDP_PATH/host/linux/x86/usr/bin and choose ntoarmv7-gdb. Click Open to confirm the setting.
  11. Click the Apply button in the bottom right corner to save these settings.
  12. Click the Kits tab, then click the Add button on the right side.
    The Options dialog displays additional fields at the bottom for configuring a new kit.
  13. Fill in the kits fields:
    1. Name the kit something meaningful, like QNX SDP 6.6 – OMAP5432.
    2. In the Device Type dropdown list, select QNX Device.
    3. In the Device dropdown list, select the device configured earlier (e.g., OMAP5432).
    4. In the Compiler dropdown list, select QNX SDP 6.6 QCC.
    5. In the Debugger dropdown list, select QNX SDP 6.6 GDB.
    6. In the Qt version dropdown list, select Qt 5.3.1 (Qt-5.3.1-armle-v-7).
  14. Click the OK button in the bottom right corner to save all the Build & Run settings.
After you've configured a QNX device and a toolchain, you can begin developing Qt apps for QNX Apps and Media systems! When creating Qt apps, you can select your Build & Run Kit in the New Project wizard to use the build and run settings that you configured earlier.