Adding images for volume control

You can copy the images related to volume control shown here to your host system and then add them as project resources so your HMI can display them.

To add images for volume control to your HMI project:
  1. Copy these images to your project folder:
    Note: In this example, the images shown left to right are named ic_vol_none.png, ic_vol_full.png, bg_volumebar.png, and fill_volumebar.png.
  2. In the Projects view, right-click the QtHmi folder, then choose Add Existing Files.
  3. In the file selector, select the files of the four images and click Open.

    A new folder, Other files, appears in the project view. This folder contains the four new image files.

  4. Open the resources.qrc file for editing, by right-clicking its entry in the Projects view, then selecting Open in Editor.
  5. In the configuration area near the bottom, click Add, then choose Add Prefix.
  6. In the Prefix field, enter img.
  7. Click Add again, then choose Add Files.
  8. In the file selector dialog, select the files of the four images, then click Open.

    In the main editing area, the list of project resources now includes a prefix entry labelled /img and four file listings under the prefix.

The volume indicator and adjustment images are now part of your HMI project. Qt Creator will compile the images into the binary and your HMI can display them.