Building and Running an Example

You can test that your Qt installation is successful by opening an existing example application project.

To run an example application on an Android or iOS device, you must set up the development environment for Android or iOS. For more information, see Connecting Android Devices and Connecting iOS Devices.

To run an example application on an embedded device, you must set up Qt for Device Creation on the development host and create connections between the host and devices. For more information, see the Installation Guide in the Qt for Device Creation documentation.

  1. In the Welcome mode, select Examples (1).

    "Selecting an example"

    If no examples are listed, check that a Qt version is installed and configured.

  2. Select an example in the list of examples.

    You can also search for examples. Enter the android or ios keyword in the search field (2) to list all the examples tested for Android or iOS. To list examples that you can run on embedded devices, enter the Boot2Qt keyword in the search field (commercial only).

  3. To check that the application code can be compiled and linked for a device, click the Kit Selector and select a kit for the device.

    "Selecting a kit to build with"

    If you installed Qt Creator as part of a Qt installation, it should have automatically detected the installed kit. If no kits are available, see Adding Kits.

  4. Click (Run) to build and run the application.
  5. To see the compilation progress, press Alt+4 to open the Compile Output pane.

    If build errors occur, check that a Qt version and compiler are installed and configured and that the necessary kits are configured. If you are building for an Android device or iOS device, check that the development environment has been set up correctly.

    The Build progress bar on the toolbar turns green when the project is successfully built. The application opens on the device.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.