Create a project
With Qt Creator open, confirm your installation was successful by creating a new project using a project template.
Figure 9: Select New File or Project from the File menu.
Figure 10: Select the Qt Quick Application template.
Click Choose to add a name and select the location for the project. Click Next.
Figure 11: Select Qt Quick Components for Symbian as the application type and click Next
Figure 12: Select the targets for the project. In this section you'll run the application using the Qt Simulator, so make sure that the simulator target is selected. If you want to deploy the application to a Symbian phone (which you do in the next step), select the Symbian target also.
NOTE: If you want to add targets later, you can do so in the Projects view, which is accessible from the left-hand toolbar.
In the next dialogue you can change the application icon, but for now click Next. In the final dialogue all the files, which will be added to the new project, are shown. You can also manage the project in version control system using Qt SDK. Click Finish to complete the project creation.
To build and run the project, click the build button (the button with a hammer icon) in the bottom left-hand toolbar (see Figure 14). The build progress bar in the toolbar turns green once the project has been built successfully. If you want to see the compilation progress, open the Compile Output log.
Run the application in the Qt Simulator
Next, run the application in the simulator. Click the device icon in the left-hand toolbar to select the target. A pop-up menu displays (see Figure 15). Click Qt Simulator to choose it as the target (the active target has a blue background colour). Tip: when you have multiple projects open in Qt Creator, make sure the correct project is active using the Project bar of the pop-up menu.
Click the green run button (see Figure 14).
Next to the simulator there is a Qt Simulator Control window (see figure 17), in which you can change the simulator settings. In the Model menu you can, for example, toggle the orientation and choose from the various device configurations. In the Sensors menu you can simulate device sensor behaviours. For more information on the simulator features, see Qt Creator Help.
Note: The simulator doesn't support the Symbian and Harmattan platform macros. For example, screen-size settings made for Symbian and Harmattan targets don't apply in the simulator. However, you can use the Q_WS_SIMULATOR macro to differentiate the code for the simulator. You can read more about the use of environment macros on the Nokia Developer Wiki.
Now you have successfully run your application in the Qt Simulator. In the next two steps, you will configure a phone and test the application on it. The configuration for Symbian and Harmattan targets differs, so separate deployment instructions have been provided for these targets.