Paja

Icon

Rapid prototyping for music, art and design work

QML environment on Mac to develop applications for Nokia N9

This post describes how to develop your first QML application on Nokia N9. Unfortunately I have only instructions for Mac users but I assume the steps for other platforms are similar to this.

Setting up environment on your Mac

  • Install Xcode (4GB).
  • Install Qt SDK (1.2GB).
  • Activate developer mode on N9 (Settings > Security > Developer mode). This may take some time to complete. Please make sure the device can access to the internet. It needs to download some applications.
  • Also install “Examples” in the Developer mode. You can see almost at the bottom of the screen.
  • Settings on Qt Creator
      • Go to Qt Creator > Preference
      • Click Linux devices section
      • Click “Add” to select Device with MADDE support
      • Give a name to this configuration. e.g MyN9
      • Select “MeeGo 1.2 Harmattan”
      • Select “Hardware Device as the kind of device
      • Do not edit IP address and SSH server port.
      • Press Continue
      • And press “No” in the next dialog. They ask if you already have a passcode.
      • Check Create key and press continue. You will create a passcode to access to N9 from your PC. The passcode is saved to the PC thus you don’t need to type it manually from the PC.
      • Click Create key in the next dialog and press continue
      • It shows “Creating keys … Done” then press continue.
      • Now you need to copy Password from N9.
    • N9
      • Connect N9 and your PC with USB and select SDK mode if dialog appears. If not go to Setting application > Accessories > USB and click “Always ask”. Then disconnect USB and connect it again.
    • Mac OSX
      • You will be asked to open Network window in System Preference on your PC and press apply to add the N9
    • N9
      • Launch SDK connection app and select USB on the N9
      • You can find password on your screen
    • Qt Creator
      • Go back to the current Qt Creator preference
      • Type the password into the dialog on Qt Creator preference and press deploy key
      • It shows “Deploying … Done.”
      • Press continue and it will automatically check if the configuration works with the N9.
      • Press Close if it says “Device configuration okay.”
      • Close all preference windows on the Qt Creator
    • Update Qt Creator
      • There might be an update for Qt Creator. Open Updater by Help > Start Updater. Do this a couple of times.
Qt Creator on Mac OSX Lion User
  • There is a bug on QML viewer running on Mac OSX Lion. The screen is flicking while elements are animated. To fix this, you need to update Qt version to Qt4.8.
  • Open Updator from Qt Creator (Help > Start Updator).
  • Select Package Manager and press continue.
  • Select “Experimental” and press Continue.
  • After the update is done, restart Qt Creator.
  • Change Qt version from Qt4.7 to Qt4.8. You can find it from Project > Run > Qt version.

First QML application on N9

  • Create a project (File > New file or project)
  • Select Qt Quick Application in Qt Quick project section
  • Give a name to the project and press continue. Please use lower cases for all letters. Otherwise it will give a waring when building the app.
  • Select Qt Quick Components for Meego/Harmattan and select continue
  • Select only Harmattan for the target setup and select continue. You don’t need Qt Simulator either Desktop.
  • You can choose your own app icon and press continue
  • Keep version control as none and press done
  • Qt Creator generates files and press yes in the dialog
  • You don’t need to edit the code at all. Just run the code (Build > Run)
  • N9 launches your Hello World application after while
Further development with N9

Some tips

  • When you open this project files in the Qt Creator, open <project name>.pro under <project name> folder.
  • Press a small red square button at the bottom of the Qt Creator window to close the app on N9.
Facebook Twitter Email

Category: Course materials

Tagged:

Comments are closed.

Social links powered by Ecreative Internet Marketing