After read the Qtopia SDK documentation I started the development of my first application, it’s very simple! The first thing that you need to do is download the Qtopia Greenphone SDK CD image, burn the image and run the SDK installer, this SDK contains a VMWare image, you can load this VMWare image using VMWare player, it contains all developer tools necessary to develop and package Qtopia based applications.
Qtopia SDK comes with an example application at /home/user/projects/application folder, this example application contains a basic skeleton of Qtopia project, here’s a list of files that are required in every Qtopia project:
- applicationname.pro – the application project file, this file contains all information about project, source and resouce files, application version and much more.
- applicationname.desktop – the file that describes a link (shortcut) to start your application, including application name, executable program location, icon, publisher and version.
- *.ui – all files generated by QT Designer, these files contains all information about application windows layout (including window controls), you can bind the any window control to your application window code.
- main.cpp – the source file that contains the initialization code of your application.
- *.h – the header files of your application.
- *.ts – i18n files.
- help/ – this directory contains html files with application help topics.
- pics/ – this directory contains image files used by this application.
- pkg/ – this directory contains the application packages ready for install in your device.
My first Qtopia app was the well known “Hello World!” application, I made a copy of the example application files to /home/user/projects/helloworld folder and then I renamed some files, I used QT Designer to design the main application window and KWrite to create and edit source and resource files of my application.
This application shows how to create an application with a QLabel, QLineEdit and a QPushButton, when the user click on QPushButton a QMessageBox is displayed with the text typed on QLineEdit.
In the next part I’ll describe the contents of project, source e resource files, I’ll also show how to compile, install and run the application into emulator