Qt Reference Documentation

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.

See Maemo 5 Examples for a set of examples showing how to do deeper integration with Maemo 5. See Platform Notes - Maemo 5 for a list of platform specific behavioral changes.

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.

Deploying Your Applications

Maemo 5 uses the Debian package format for installation. Please refer to the Maemo 5 packaging documentation (http://wiki.maemo.org/Maemo_packaging) for information on how to create Debian packages.

After generating the debian/ packaging directory with dh_make, the Qt dependency should be specified by adding libqt4-dev (>= 4.6.1) to the Build-Depends line of the debian/control file. This ensures that the Qt development headers must be available in order to build the package.

For qmake based projects, edit the debian/rules file and search for the configure-stamp: section. There should be a comment in that section stating # Add here commands to configure the package. After that line, add qmake myproject.pro (replace myproject.pro with the name of your qmake project file). This ensures that qmake is invoked instead of running a configure script. Since qmake uses the environment variable INSTALL_ROOT to redirect installations, the default use of the DESTDIR variable needs to be changed. Look for the install: section in debian/rules and replace all occurences of DESTDIR with INSTALL_ROOT.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();