Getting Started with Qtopia

From the horse's mouth (Trolltech) come instructions on how to get started writing applications for Qtopia.

Trolltech's Qtopia is an embedded application framework designed to give vendors maximum customization and third-party developers the choice of developing commercial applications or free GPL applications. Qtopia is available under dual licenses. Developing for Qtopia is as easy as any Qt/KDE desktop development, except for a few extra steps and tools needed.

I started developing my program Gutenbrowser, which is a reader/downloader for the thousands of free etexts available from Project Gutenberg. It started out as a Linux-only application and soon made its way to Windows, Qtopia and then to the Open Palmtop Integrated Environment (Opie). Opie is based on Qtopia GPL and is community developed.

Qtopia is built on Qt Embedded, so an application that is created with Qt easily can be made to run in the Qtopia environment. It took about two weeks part-time/open-source-developer time to get Gutenbrowser running on the Sharp Zaurus, and that includes learning Qtopia API and cross-platform compilation as well!

If you want to port a Qt 4 application to Qtopia, it would be best to wait for Qtopia 4 to be released, as there are significant changes between Qt Embedded 2.3 and Qt Embedded 4. Qt 3, KDE and even Gtk+ applications have been ported to Qtopia versions 1 and 2 but require back-porting, class substitution and the use of microkde sources for the KDE programs.

Tools You Need

To get started developing for Qtopia, you need a few tools. Qtopia is Linux-only currently, so you need a Linux desktop on which to develop. You also obviously need an editor, such as emacs or vi. For this project, I chose KDevelop as it comes with a simple Qtopia application template.

If you are developing for a device, you need a cross-compiler. Our target device, the Archos PMA430 uses arm-linux-gcc version 2.95 for Qtopia. Although gcc 3 produces better optimized code, we want to run on and be compatible with software currently existing on hardware, so 2.95, as old as it is, will do. You can get ARM cross-toolchains from various sites on the Internet. In this case, Archos has a toolchain available at and links are also available from

Source Code or SDK?

Of course, you also need Qtopia, but you have the choice of downloading the source code or using a ready-made Qtopia SDK. The SDK for the PMA430 is available in commercial and GPL versions, just like Qtopia itself. The commercial SDK can be purchased for a reasonable sum from, and the free, GPL version can be downloaded from These install to /opt/Qtopia. Then from a command prompt do:

# ln -s /opt/Qtopia/sharp /opt/Qtopia/arm

if there is no /opt/Qtopia/arm directory.

KDevelop Project

Start KDevelop, and from the Project menu choose New Project. Open the C++ directory icon, under the directory Embedded. Click the file called Qtopia Application to start a new Qtopia project. I could name this anything, like hippopotamus, but instead I will name my project skizzy. See Figure 1 for an example dialog for creating this project.

Figure 1. Creating the skizzy Project

Once you have a project, you can start editing it to suit your needs. You need to be sure to use Designer from Qt 2 when you edit .ui (user interface) files for Qtopia, as .ui files generated from later versions of Qt are not compatible. I do this by setting up a custom external tool and then opening my .ui file from within Designer 2.

Note: do not open by clicking on the .ui file, because Designer 3 will open up within KDevelop, and you can mangle your .ui file. Because of this, you have to run KDevelop from a command line, after exporting a few variables:

export PATH=/opt/Qtopia/bin:$PATH
export LD_LIBRARY_PATH=/opt/Qtopia/lib:$LD_LIBRARY_PATH

You also want to set up the Qt Virtual framebuffer tool by the name of QVFb, pointing to /opt/Qtopia/bin/qvfb, in which the application will run on the desktop. Qtopia displays directly to the framebuffer, and therefore it does not need the overhead of the X-11 display server.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How to install Qtopia core for arm?

Anonymous's picture

I'd be grateful if you could tell me step by step how to install Qtopia for arm. Whether there are any compatible (more importantly incompatible) toolchains for Qtopia core to work. I tried to compile Qtopia core 4.2.2 for arm by giving ./configure -embedded arm, and the make failed. I am using the toolchain with binutils 2.17 and gcc 4.1.1. My native gcc has version 4.0.0
Qtopia core has compiled successfully for my i.386 machine.

Qtopia application deployment

Sakthi's picture

The article is wonderful and it covers the things for beginners...

But we need some more guidelines on 'Deployment of advanced
Qtopia application on target board' because any small application
could be deployed to the target board without any problem..

So we need some more guidelines about the deployment of application
that uses pim library ...developed using Qtopia 1.7 sdk but the
target has qtopia 1.5 ( does not have any pim libraries )


Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
On Demand
Moderated by Linux Journal Contributor Mike Diehl

Sign up now

Sponsored by Skybot