Creating a project for a Qt HMI

The first stage in writing a Qt HMI is to create a project in Qt Creator and add the files that define the UI, application entry point, and how to package the project components.

In particular, the project will contain:

To create a Qt project and start defining its project file:
  1. Launch Qt Creator.
  2. In the File menu, choose New File or Project...
  3. In the Projects dialog, choose Other Project, then Empty Qt Project, and then click Choose...
  4. In the Location page of the Empty Qt Project dialog, name the project QtHmi, then click Next.
    Note: All files related to the project—C++ and QML source code, resource files, and the project configuration file—will be stored in the folder specified on the Create in line in this dialog.
  5. In the Kits page, choose the kit that you configured when setting up Qt Creator (e.g., QNX SDP 6.6 – OMAP5432), then click Next.

    To define a kit, you must first define toolchain settings (e.g., compiler, debugger), as explained in "Configuring a toolchain in Qt Creator".

  6. In the Summary page, click Finish to save your new project's settings.

    Qt Creator creates the new project and displays the empty file in the editing area.

  7. Add the following lines to this file:
    # We're building an app
    TEMPLATE = app
    # This is the name to give the compiled application
    TARGET = QtHmi
    This action configures the project to build an application binary (as opposed to a dynamic or static library).
    Note: The project file can define many variables that affect how qmake builds the project; for the full list, see the Variables | QMake reference in Digia's online Qt documentation.