Show Contents

# 3.1. Create the application

To create a "Hello World" application, first create an empty QA Quick Application project and then add code to the project.

## 1. Create an Empty QT Quick Application project

Follow these steps to create a new empty QT Quick application project:

1. Click File > New File or Project.
2. Select Application from the Projects list at the left.
3. Select Qt Quick Application - Empty.
4. Click Choose to start the project creation wizard.
5. Fill the Project Location page fields:

1. Enter a name for the new project, for example <PLATFORM>_QTQ_HelloWorld.
2. Set the location of the directory that will hold new project, for example /home/<user>/workspace.

Note The selected directory must already exist.

6. Click Next to continue.
7. In the Build System page select qmake and click Next to continue:
8. In the Details page, set the Minimal required Qt version to the version you configured in the Configure DEY Qt Compiler step.
9. Click Next to continue.
10. In the Kit Selection page, check the previously created Kit configuration.
11. Click Next to continue.
12. In the Project Management page, click Finish to end the wizard.
13. The new project is created and displayed in the projects view:

## 2. Add code to the project

Follow these steps to add code to the project:

1. Copy the following block of code and paste it inside the Window section of the main.qml file:

       main.qml

       Text {
           anchors.centerIn: parent
           text: "Hello, World!"
       }

   The piece of code above creates a new text label in the center of the application window displaying the text "Hello, World!"

   Click here for an example

2. Save the file (ctrl+s or File > Save All)

© 2018 Digi International Inc. All rights reserved.
3.1. Create the application updated on 30 January 2018 09:32:06 AM