Nokia Qt SDK – development for Nokia N900
Recently I’ve started (finally) realising my idea of creating application for Nokia N900. Since PR1.3 update is already available and Qt 4.7 is supported by N900 it’s easier to make new application. With Nokia Qt SDK it’s even easier, since it has possibility to test directly on your phone.
First of all you need to install Nokia Qt SDK on your computer. You have choice of full installer and online installer that will download needed parts of SDK during installation process. Second of all, to have possibility to debug and test your applications on the phone, you need to install Mad Developer application on your N900.
Now that we have everything installed let’s start with our application. Run Qt Creator and create new project, in popup window choose Mobile Qt Application. In the next steps you can choose name for your project, location on hard drive and which components to use for this application. I’ve chosen all of them, since it may become not-only N900 application. Next you can choose base widget for the application, I left the QMainWindow and everything by default. If you uncheck Generate form you will have plain code application, without main window editable via WYSIWYG widget designer. For the first application, let’s have this possibility so leave this checked. If you also want to use some kind of version control, there is also possibility to include it in the last step, but let’s leave it for now.
Now we have our project started and we can put some widgets on the screen and test it, let’s put a button on the window, get one from list on the left and place, resize as you want. On the right you can modify object’s properties, upper part lists objects, lower part lists properties, for example text placed on button, let’s change it for something else. In the same way let’s change windowTitle of our main window. Now that we have something visible, let’s moove to testing it on N900…
From menu choose Tools and Options, there in category Projects go to Maemo Device Configurations tab and here the magic begins. The simplest way is to have your N900 connected to the same network as the computer (for example via WiFi). On the phone run Mad Developer application and there you will have your IP address visible, just click developer password button and copy needed data to configuration on computer, create new device profile, give it a name, choose Remote device and Password options, put IP address in Host name field and password generated on N900 in Password field. Now to ensure your configuration will be used choose Projects in Qt Creator, open Maemo Run settings and ensure that your device configuration is chosen.
So, let’s test it finally, go back to Design and save your changes then just click first play icon (one without beetle on it) on the left. If it asks to save changes then save all and wait few seconds for the application to be run… and voilla, you have your first N900 application running on your phone. For now it just displays the button, but you can have a look at Qt 4.7 Tutorials to find out how to make fully functional applications.
Try it yourself, maybe you can make something really big!