PyMaemo/GUI toolkit selection guide
This page describes the alternative toolkits with which graphical user interfaces can be created in PyMaemo. Their respective differences and future prospects are discussed to help any new PyMaemo developers make an informed technology selection.
In particular, the differences of GTK+ and Qt toolkits are described, as well as the roles of the PySide and PyQt Qt binding projects.
 GTK+-based toolkits
GTK+ is a widget toolkit for creating graphical user interfaces. While written in the C programming language, it is object oriented. Object orientation is achieved by using the Glib object system (GObject). In the open source community, Gtk+ is most notably used in the GNOME project.
Hildon is an application framework developed by Nokia for the Maemo operating system. It primarily consists of a set of GTK+ extensions providing mobile device oriented functionality and a finger-friendly interface. It has been the primary graphical toolkit in Maemo devices until Maemo 5.
 Python Hildon
Python Hildon is the Python language wrapper around the Hildon framework, allowing Python developers to use Hildon in Python programs. It depends on PyGtk for creating graphical user interfaces.
Python Hildon has been available for many years and has been updated to support the features of the Maemo 5 platform. The bindings are stable and widely used in the Maemo developer community.
If you plan to start developing software for the Nokia N900 (Maemo 5) only, Python Hildon is probably the most straightforward selection. However, as the level of GTK+ and Hildon support in Maemo 6 is still unknown (it will probably be community-supported only), it might provide for a more difficult upgrade path in the future Maemo platform versions.
 Qt-based toolkits
Qt, developed by Nokia's Qt Development Frameworks division, is an application development framework consisting of a comprehensive set of GUI widgets as well as non-GUI functionality such as network support, thread management, XML parsing, and so on. Qt is written in C++. KDE is the most significant project in the open source community using Qt.
The future Maemo platforms will be based on the Qt framework. The native GUI widget set will be DirectUI which is not part of Qt but will be derived from QGraphicsView. In a similar manner, the platform APIs (Maemo API) will be heavily based on Qt principles, providing Qt-like class hierarchies for different functionalities.
Any native Qt application written for Maemo 5 adopts the platform's native look and feel. Furthermore, these applications will be at least source-level compatible with Maemo 6 and will adopt its look and feel accordingly. Hence, Qt is the best selection as a toolkit if you want to future-proof your application.
The development snapshot releases of next versions is available from extras-devel, and is marked with ’experimental’ in the package name (libqt4-experimental, python2.5-qt4-experimental, pyside-experimental). Use these packages only if you need cutting edge features and have no intention of publishing your software to end-users.
PySide is a Python binding for the Qt framework, developed by Nokia at OpenBossa by the same team as PyMaemo itself. It was initially published in August 2009 and, on the Maemo 5 platform, provides full-featured bindings for Qt 4.7 (on Maemo 5, Qt 4.6, including the Maemo-specific QMaemo5 classes). PySide is licensed under LGPL, allowing both open source and proprietary software development. The generator tools for creating new bindings are also available, allowing developers to rapidly create new bindings if required.
The PyMaemo team will provide the bindings for the Harmattan platform APIs (MeeGo Touch, Qt Mobility, select Harmattan platform APIs) using PySide.
Since PySide is a relatively young project, it is still ongoing maturization period and faces more changes than PyQt.
If your project requires Maemo/MeeGo-specific Qt extensions or latest Qt features and you want your application to work in the future MeeGo platforms, PySide is the best choice for you.
PyQt is a Python binding for the Qt framework, developed by Riverbank Computing Ltd. It is a very established and stable set of bindings and widely used in the desktop world. On Maemo 5, it is maintained as a community effort. PyQt on Maemo 5 provides support for both Qt 4.6 and Qt 4.5. It will also support the future Qt 4.7 through experimental releases in extras-devel. PyQt for Qt 4.6 supports the Maemo 5 specific classes.
It is licensed under GPL for Open Source projects, but a commercial license can be obtained from Riverbank for proprietary development. While new PyQt-compatible bindings can be created using SIP, no freely available automatic binding generation tools exist, making independent generation of bindings for large SIP-based libraries impractical.
PyQt cannot be intermixed with the future Harmattan platform API bindings created using PySide (though such bindings might become available via PyQt).
PyQt is currently the most mature set of Qt bindings for PyMaemo. It provides a stable, and bugfree set of Python Qt bindings. Moreover, the source-level compatibility of PySide with PyQt is rather high, making porting PyQt programs to PySide (and vice versa) an easy task, thus providing an upgrade path for PyQt developers in the future. PyQt (as a Qt 4.5 binding) is also available on the legacy N800 and N810 devices and pre-PR1.2 N900s.
If you want to release a Python Qt 4.5 or Qt 4.6 application with as stable bindings as possible, and are prepared to possibly port your code to PySide in the future, then PyQt is the right choice for you.
 Current Versions
PyQt 4.7 for N900 was released in Feb 2010 announced here
- This page was last modified on 23 June 2010, at 12:21.
- This page has been accessed 10,045 times.