Symbian developer community

 
wiki

Qt Technical Overview

From Symbian Developer Community

Jump to: navigation, search
Getting Started with Qt
 > Qt in a Nutshell > Qt Technical Overview > Qt Quick Start

This article provides a brief technical overview of the Qt cross-platform application and UI framework and its relationship with the Symbian platform. It explains what you can do with Qt, and then goes on to provide targeted information for the audiences likely to be interested in working with Qt on the Symbian platform:

  • Experienced Symbian C++ developers who want to find out more about Qt
  • Experienced C++ and Qt developers who are considering working on the Symbian platform for the first time

Developers who are just interested in setting up a Qt development environment and getting started should read the Qt Quick Start.

Contents

What is Qt?

Qt (pronounced 'cute') is a cross-platform application and UI framework that allows you to develop applications in C++ and to recompile them to deploy across a range of operating systems, both desktop and embedded. Qt is developed by Qt Development Frameworks (a wholly owned subsidiary of Nokia), which was formerly known as Trolltech. It is used in multiplatform applications such as the Opera web browser, Google Earth, Skype and Adobe Photoshop Elements.

Qt applications are portable across major desktop and mobile platforms:

  • Symbian platform and earlier S60 devices
  • Maemo/MeeGo and embedded Linux
  • Windows Mobile
  • Linux (Qt is the main application framework for one of the most popular Linux desktops, KDE, and is also supported on distributions using the rival GNOME desktop)
  • Mac OS X
  • Solaris
  • Windows
  • Other
Qt Architecture & Tools

The ability to run Qt-based applications on the Symbian platform provides the opportunity to deliver applications to more than 80 million mobile devices. You can see a video of Qt running on three different mobile operating systems on YouTube: S60 (Nokia N78), Windows Mobile (HTC Touch) and Embedded Linux (Neo1973).

Qt on the Symbian Platform

Qt supports the Symbian platform as a tier 1 target (since Qt 4.6.0). Qt 4.6 supports almost all Qt modules - the platform notes explain the level of testing and support.

Although not every module is complete, the release enables you to use the Qt framework to create new applications for, or deploy existing Qt applications to, Symbian^1 (a copy of S60 5th Edition v1.0) and Symbian^3 devices (and S60 3rd Edition FP1 and later devices). From Symbian^4, a Qt based UI is expected to replace the native Symbian C++ UI Framework (Avkon).

Qt has its own GUI widget set, which emulates the look and feel of other platforms via 'styles' (see the QStyle class). On the Symbian platform Qt provides a style that makes a number of the Qt UI widgets look and behave like their native counterparts. This includes elements from the current user-selected theme.

What is Available?

According to the Symbian platform notes (Qt 4.6) almost everything in generic Qt is available. In addition, Symbian has excellent platform compatibility with the Qt Mobility APIs. The changes between what is delivered in individual revisions can be tracked on the Qt Version Changes page.

The omissions to core Qt support are reproduced below:

Technology Note
QtConcurrent Planned for future release.
QtDBus No current plans to support this feature.
QtOpenGL ES Planned for future release.
Printing support No current plans to support this feature.
Qt3Support No current plans to support this feature.

The following technologies have limited support:

Technology Note
QtSql The only driver supported is SQLite.
QtMultimedia Although the module itself is supported, no backend for Symbian is currently available. However, there is a backend available for Phonon.


How Do I Get Started?

The Qt Quick Start contains full instructions on how to setup your Qt development environment, and create your first Qt application on the Symbian platform.

Examples and Demos

Qt comes with a set of demonstration applications that may be run on your phone. The examples are installed through the through the fluidlauncher.sis file, which is installed with your Qt SDK installation (by default C:\NokiaQtSDK\Symbian\sis\fluidlauncher.sis if you've installed the Nokia Qt SDK). The installation contains everything needed to run the examples (including Qt binaries, Open C and Open C++) and automatically launches the fluid launcher demo browser following installation.

More advanced users may wish to rebuild the fluidlauncher and demo applications for the emulator. Note that it is only possible to run one Qt application in the emulator at a time, owing to restrictions on the use of writable static data in DLLs for multiple processes. For this reason, on the Emulator the fluidlauncher demo will not launch any of the other demo applications, although you can run them all individually and they will work as expected.

General Qt programming examples can be found here: http://qt.nokia.com/doc/4.6/examples.html (there are also installed with your SDK). There are also addition examples on Forum Nokia (including Qt Mobility API Basic Examples Part 1 and others which show the use of the Qt Mobility APIs).

In addition, Forum Nokia has some examples showing how to interwork with Symbian C++ here. The example applications demonstrate a simple UI, creation of dynamically linked libraries (DLLs), the integration of active objects with Qt’s signals and slots idiom, and the use of wrapper classes to get access to Symbian C++ APIs (for example, SMS).

I’m a Symbian C++ Developer: What Do I Need to Know About Qt?

What Kind of Development is Qt Good For?

Qt is ideal for building GUI applications rapidly. It offers a drag-and-drop GUI designer (QtDesigner), and a comprehensive set of controls (widgets), from buttons and dialogs to tree views and tables. It also provides easy UI internationalization and a powerful help system that can be customized and redistributed with your application. There is a QtWebKit module that provides powerful and flexible integration with the WebKit browser engine for the creation of rich Internet applications and a cross-platform multimedia framework called Phonon for audio and video. The Graphics view classes integrate easily with the animation and state change frameworks to make it very easy to create dynamic and elegant UIs.

Qt also provides a stream reader and writer for XML documents, and C++ implementations of SAX and DOM protocols. Qt supports XQuery – a simple SQL-like query language for traversing XML documents to select and aggregate XML elements of interest and transform them for output as XML or in some other format. Finally, as you might expect, there is an extensive set of classes for handling network programming and also concurrent programming via multiple processes or threads, as well as an event-management framework.

There are new features coming in Qt 4.7 that will provide even more options to UI designers and developers, including Qt Quick, a new descriptive UI design language that leverages the Graphics view classes. These can be reviewed on other platforms using the Qt 4.7 technology preview.

What Development Language Should I Use?

The Qt API is implemented in C++ and most Qt developers use C++. Although other language bindings are supported on the desktop, only C++ can be used to create Qt applications for Symbian platform devices.

Qt developers use standard C++ rather than the Symbian C++ dialect that is offered by the native Symbian platform APIs. If you have only developed with Symbian C++ and want to start using Qt, you will need to adapt to a different approach. Many of the Qt classes and idioms are much simpler than their Symbian equivalents (compare QString with the multiple descriptor classes, for example!) but others will require you to make changes to the way your code is structured. For further information about mixing Symbian C++ with Qt, please see Using Qt and Symbian C++ Together.

Qt provides support for many common mobile use cases through the Qt Mobility Project APIs. Should your application need to access mobile or device features for which there is no built-in support in Qt, you can create your own hybrid applications using the patterns described in the article Using Qt and Symbian C++ Together. If you are only targeting the Symbian platform, then you can use the Qt Mobile Extensions provided by Forum Nokia, which are Qt wrapper classes on top of a Symbian C++ implementation.

Support for Other Languages and Scripting

Qt provides official support for development in either C++ or Java.

Language bindings for Java, Python, Ada, Pascal, Perl and PHP are also available; many of these solutions are produced and maintained by teams of open-source developers. You can find out more from qt.nokia.com/products/appdev/programming-language-support. At the time of writing, apart from QtScript, none of the other language bindings are supported for Symbian platform development, and there is no plan to add official Java support in the near future.

Qt also provides the QtScript module, which is a JavaScript-oriented technology that enables developers to extend their C++ applications with scripts.

Where Can I Find Out More?

Developers coming from a Symbian background should read Qt for the Symbian Platform (Product Overview). You’ll find a host of useful information on the Qt Development Frameworks website, such as How to Learn Qt from the Qt documentation set at qt.nokia.com/doc/. The Technical Introduction to Qt whitepaper is an additional resource for anyone unfamiliar with Qt.

I’m a C++/Qt Developer: What Do I Need to Know About Symbian?

If you are a C++ developer, then using Qt can make GUI development easier than it was, and you can expect to create working applications much more quickly. A number of developers report that Qt is easier to learn and makes them more productive than many platform-specific toolkits. Although Qt is a cross-platform framework, many people use Qt for single-platform development alone, preferring Qt’s APIs to the native set offered by the platform.

If you are already creating Qt applications, you can now extend the reach of your existing Qt applications to the millions of devices built on Symbian platform and the S60 3rd Edition that supercedes it.

Developers writing "pure" Qt applications need to know very little about Symbian C++. The Qt Quick Start explains how to set up a standard Qt development environment using the Nokia Qt SDK, which contains familiar Qt tools including Qt Creator 2.0.0 beta (this same SDK can also be used to target Maemo devices). You will need to know a little bit more about the Symbian platform security model and Deploying a Qt Application, but not too much else.

However, developing software for any mobile device is quite different to developing software for desktop computers. Some factors to bear in mind include:

  • Reduced screen sizes
  • Different and restricted input methods
  • Reduced processor capabilities
  • Limitations in memory and disk space
  • The importance of conserving battery lifetime using power-management techniques
  • Network signal availability.

If you want to write applications that mix Qt and Symbian C++ this is also possible. You will need to set up your development environment following the instructions in Using Qt with Standalone SDKs. You will then probably use a similar approach as you would use if you were developing with the native C++ APIs. You will use:

  • The same development environment (SDKs, tools, emulator and Carbide.c++)
  • The same build and debug features inside Carbide.c++
  • The same approach to package applications for installation to the device, meaning that you will require a basic understanding of platform security and application signing.

A good place to find out more about the native Symbian platform is the Symbian wiki documentation found here.

Source Code and Contributing

Qt is an open source project that is developed completely in the open and also accepts contributions from the community. For more information on getting the source code and submitting your own contribution to Qt, please see http://qt.gitorious.org/qt/pages/Home.

You can contribute to the Qt category in this wiki at Category:Qt. Feedback on the port can also be provided on the Qt discussion forum on Forum Nokia: discussion.forum.nokia.com/forum/forumdisplay.php?f=196.

Where Can I Find More Information?

Getting Started

Qt on Symbian Development

General Qt Development

Books

There are a number of books about developing with Qt. We recommend:

In addition, there is a new book on Qt for Symbian, that we've not yet looked at!

Other


Getting Started with Qt
 > Qt in a Nutshell > Qt Technical Overview > Qt Quick Start

Comments

Sign in to comment…