Tag: cpp

Hello World with Qtopia (Part 4 – Application Code)

Posted by – June 3, 2008

In my previous articles about Qtopia application development I showed the directory structure for a Qtopia project, the contents of basic Qtopia project file (helloworld.pro) and how to create the application interface with user interface files (helloworld.ui), in this article I’ll talk about the classes to be used in our helloworld application and how we can integrate the user interface files in our applications.

Every Qtopia application requires a initialization code like we have in the code block below:

main.cpp

1
2
3
4
5
6
7
8
9
10
11
/*
We must include the header file below since it contains
the HelloWorld class definition.
*/

#include "helloworld.h"
#include <qtopia /qtopiaapplication.h>

//Set the HelloWorld class as the main class of helloworld application.
QTOPIA_ADD_APPLICATION("helloworld", HelloWorld)
//Add initialization code to this application
QTOPIA_MAIN

In the example above we are using to macros QTOPIA_ADD_APPLICATION and QTOPIA_MAIN, both are only available if qtopia_main is set in CONFIG variable of application project file (helloworld.pro) as described in this article.

More

Share

Debugging Symbian Applications – A Hard Task

Posted by – May 30, 2008

I have been working hard trying to fix a bug with timeout engine of a symbian app used to handle socket timeout, sometimes the application crashes when the first timeout happens and others after several timeouts.

We had used large TBuf descriptors in many places of application, I changed to RBuf, no success.

I hope find the main reason of this bug soon and get more expertise with Symbian application development and debug.

Share

Hello World with Qtopia (Part 3 – User Interface Files)

Posted by – May 28, 2008

The majority of applications requires a user interface to allow user interaction with application functionalities, this third part of our article will talk about the user interface files that are xml files used to define the contents of Qtopia graphical elements like dialog boxes and windows.

In the example below we are defining a QWidget called HelloWorldBase, this widget is the main window of helloworld application, it contains a QLineEdit (input box), a QLabel and a QPushButton each of then can be declared in xml using the <widget> tag where the class attribute indicate the widget type and name attribute holds the object instance name. Each widget may have default values for its properties, you can define the widget properties using <property> tag, a property requires a name that must be supplied on name attribute of this tag.
More

Share

Hello World with Qtopia (Part 2 – Project File)

Posted by – May 23, 2008

In my previous article we had a short introduction to Qtopia development, I also showed how to use the example project that comes with SDK to start a new one.

This article will talk a little about one of the most important files of any Qtopia project the applicationname.pro file, this file contains very important configuration parameters for every Qtopia application, please open your preferred text editor and put the code below (look the comments):
More

Share

Hello World with Qtopia (Part 1 – Project Structure)

Posted by – May 14, 2008

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:
More

Share