Home · All Classes · All Functions · Overviews

The Maemo 5 Platform - Introduction to Qt

Required tools

See Qt for Maemo 5 Requirements to see what tools are required to use Qt for the Maemo 5 platform.

Installing Qt and Running Demos

Follow the instructions found in Installing Qt on the Maemo 5 Platform from a Binary Package to learn how to install Qt using a binary package, and how to build and run Qt demos.

Building Your Own Applications

If you are new to Qt development, have a look at How to Learn Qt. In general, the difference between developing a Qt application for Maemo 5 compared to any Linux with X11 is not that big.

qmake is fully supported for Maemo 5 and can be used to build Qt applications. qmake will take care of all platform-specific compiler flags required to build for a device. For more information on how to use qmake have a look at the qmake Tutorial.

After running qmake, type "make" to build your application.

Running Your Applications in Scratchbox

Please consult the Maemo 5 documentation about setting up Scratchbox and Xephyr to obtain a Maemo 5 emulation environment. Do not forget to set the DISPLAY environment variable.

As documented, all Qt applications that are started from the console must be run with the "run-standalone.sh" shell script. This script sets up the Maemo 5 environment, which is required to enable the Maemo 5 support in Qt.

Example: Instead of running "./wiggly" to bring up the Wiggly example, you should use "run-standalone.sh ./wiggly".

Note: For convenience, "run-standalone.sh" can also be sourced into your current shell with "source /usr/bin/run-standalone.sh". In that shell, it is no longer required to invoke "run-standalone.sh" on every Qt application launch.

Running Your Applications on the Device

To run an application without installing it on the device, copy it using secure copy (scp, requires an ssh server to be installed on the device) or use NFS to mount your desktop PC's drives on the device.

Open the X terminal and execute your application; for example, by typing "/home/user/myApp/myApp". The "run-standalone.sh" script is not required. Note that applications must be launched as the default user.

Note that Maemo 5 does not execute binaries from memory cards. Applications must be copied to the internal memory first.

Installing Your Own Applications

Maemo 5 uses the Debian package format for installation. Qt applications install like all other Maemo 5 applications. Please refer to the Maemo 5 packaging documentation for information on how to create Debian packages.

As with all applications, the dependencies of a Qt application need to be specified by adding the respective libraries to the "Depends" field in the package's control file. Every Qt library is shipped in its own package. The package name starts with "libqt4-" followed by the library name in lowercase.

Example: If your application requires QtCore, QtGui, QtSql and QtOpenGL, your "Depends" line should contain "libqt4-core, libqt4-gui, libqt4-sql, libqt4-opengl".

If your application is open source, add "libqt4-dev" to the "Build-Depends" settings in the control file. The "libqt4-dev" package contains headers for all Qt libraries.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.2