docs.kde.org
Qt/Embedded
Prev
Next

Qt/Embedded

Qt/embedded is a version of the Qt™ library that does not use the X window system, but draws directly to the framebuffer on Linux® systems. It is therefore interesting for embedded systems which have tight restrictions on the memory usage of the whole system. Its API is fully compatible with the one of the X11 version.

Developing an application for Qt/embedded with KDevelop is not very different from developing a program for the X11 version of Qt™. In fact, you can use the same codebase for both versions. If you use the autoproject project management, you switch to the embedded version by passing the argument --enable-embedded to the configure script. You can set this in the Project->Project Options... dialog under Configure Options. With the option --with-qt-dir=DIR you set the directory in which Qt/embedded is installed.

After configuring and compiling your application with these options, it will link with the libqpe.so library. This version of your application will not normally run when you use X11. In order to test it, run it under the control of the program qvfb (Qt™ Virtual Frame Buffer). This is done by starting qvfb and then starting your application with

app -qws -display QVFb:0

Naturally, when you have a working version of your application, you will want to use it on the target processor. For this, it will probably be convenient to create multiple build configurations, as explained above, so that you can quickly switch between the version running on your development system and the version running on the target system.

Applications for Qt/embedded normally run as single applications on the device they are designed for. Trolltech also supports Qtopia, which is a collection of applications for PIM, web browsing and various other areas that work together in a consistent manner. It is the standard environment for instance on the Sharp Zaurus. You can write applications that integrate into this environment by using the Qtopia SDK. This implies making your application class a subclass of QPEApplication and linking to the library libqpe.so. If you develop your application with the autoproject project management, you have to add --enable-qtopia to the configure options.

Prev
Next
Home


docs.kde.org