Creating projects and targets
When you start the QNX Momentics IDE for the first time, the Workspace Launcher dialog box prompts you for a location to store your workspace. All of your IDE projects are stored in this folder.
Create a new project
The first step in developing an application is creating a project to contain all of your source code and assets.
To create a new project:
- Click File > New > BlackBerry Project.
- Select Application as your project type, select Cascades as your application type, and then click Next.
- Select a template and click Next.
- In the Project Name field, provide a name for your project and click Finish.
After you finish, you'll be prompted to open the project in the QML Editing perspective. The QML Editing perspective contains a number of views designed to assist with QML development, like the Components view and the QML Properties view.
Import an existing project
Sample apps and tutorial code are packaged as projects that are compatible with the QNX Momentics IDE. You can import the project by performing the following actions:
- In the QNX Momentics IDE, on the File menu, click Import.
- Expand General and select Existing Projects into Workspace. Click Next.
- Select the Select root directory option and click Browse.
- Browse to the location where you extracted the sample project folder and click OK.
- In the Projects section, select the project that you downloaded, and click Finish.
You'll see the project in the Project Explorer view, and you can explore the source code and run the app.
When creating a new project, there are several different project templates to choose from. Each template provides a unique starting point that you can use for building your app. You should take some time to explore the different layouts and navigation models to see what kind of UI works best for your application.
Each project that you create or import into the QNX Momentics IDE contains a number of different files and folders that you should take some time to familiarize yourself with.
- src: This folder contains the C++ source and header files for your application.
- arm: This folder contains binaries used for running the application on a device.
- assets: This folder contains the assets for your application, including images, sounds, video, and QML files.
- translations: This folder contains translation files containing localized text which the application uses to support different locales.
- x86: This folder contains binaries used for running the application on the simulator.
- bar-descriptor.xml: This file contains all the configuration settings required for your application. For more details about various configuration settings, see Using the bar-descriptor.xml file.
- config.pri: This autogenerated file contains build instructions for precompiled headers.
- Makefile: This file contains build settings for your application. When you use the QNX Momentics IDE to build and package your application, you don't typically have to modify any of these instructions.
- precompiled.h: This file contains a list of headers that you want precompiled by your application.
- .pro: This file contains project settings for your application. This file also lists the libraries that your application links against. For more information about linking to libraries, see Linking against libraries.
Create a target
When you set up your development environment, one of the steps is to use the BlackBerry Deployment Setup Wizard to create and configure a target to run your applications on. If you need to set up an additional target, you can do so afterwards without going through the wizard again.
To create a new target:
- Right-click in the Target Navigator view, and click New BlackBerry Target.
- In the Target Name field, provide a name for the target or click the Same as hostname check box.
- In the Connection section, specify the name of your host, or the IP address you want to use for the connection.
- In the Password field, provide the password that the device uses (not required for the simulator).
- Click Finish.
If you're using a device as a target, you must turn on development mode on the device before you can connect to it through the IDE. The simulator is in development mode by default.
Last modified: 2013-03-21