This package should work fine with Qt/X11 and Qt/Windows, but it is targetted at small handheld devices such as the SHARP SL5000 or Compaq iPAQ, and includes some Qt/Embedded specifics such as additional input methods for virtual keyboards and handwriting recognition. Similarly, it's easy to make an existing Qt-base program part of Qtopia, but usually you will make changes such as simplifying the UI and reducing the screen-space required by the application.
The source code to Qtopia is available from the SourceForge respository, via CVS, or download a recent source code release.
To build the package, you have a number of options, each described in detail below. The instructions assume you have unpacked the source code and all commands are relative to the top-level source directory, which is also referred to as $QPEDIR.
Before building Qtopia, you need to have Qt/X11 installed on your development system, because you need the uic command from Qt/X11 (uic needs the "Everything" configuration as it uses properties). Having Qt/X11 on your system will also allow you to use the Qt Designer under X11, which is a great way to build user interfaces (most of the applications in Qtopia have been designed with the Designer). Note that since Qt/Embedded and Qt/X11 have different library names (libqte and libqt), both can safely be on your $LD_LIBRARY_PATH, or even stored in the same directory.
Note, in Qtopia 1.4.0, some files are missing. It is sufficient
to use empty files:
touch $QTDIR/src/kernel/qqnxkeyboard_qws.cpp
touch $QTDIR/src/kernel/qqnxmouse_qws.cpp
touch $QTDIR/src/kernel/qsharedmemory.cpp
touch $QTDIR/src/kernel/qsharedmemory.h
This will be corrected ASAP, but there is furious work on Qtopia
at the moment that is delaying the release process.
For all build types you will need to build Qt/Embedded in some way. You can download Qt/Embedded from the Trolltech website.
Before building it, check to see if there is a patch required for Qtopia by looking at $QPEDIR/qt/*.patch for a patch matching the Qt/Embedded version you are compiling with, and apply the patch with:
cd $QTDIR patch -p0 -s <$QPEDIR/qt/qte???-for-qpe.patchTry to always use the latest Qt/Embedded version and the latest Qtopia version.
This build method gives the smallest and fastest result, and reflects a type of build that an embedded device might use when the application suite is more-or-less fixed.
cp ./qt/qconfig*.h $QTDIR/src/tools
cd $QTDIR make clean ./configure -static -qconfig qpe-single make
This creates $QTDIR/lib/libqte.a.
cd back-here make clean ./configure -static make single
This creates $QTDIR/lib/libqpe.a and single/qpe.
strip -R .note -R .comment single/qpe
This build method gives the most extensible result, and reflects a kind of build that an embedded device might use when the application suite is extended by the end-user.
cp ./qt/qconfig*.h $QTDIR/src/tools
cd $QTDIR make clean ./configure -qconfig qpe make
This creates $QTDIR/lib/libqte.so*. You can of course use the default "Everything" Qt configuration, which isn't in the spirit of making small applications, but is useful if you want to have the entire Qt API available.
cd back-here make clean ./configure make
This creates $QTDIR/lib/libqpe.so* and bin/*, including a bin/qpe that launchers applications as separate processes (rather than as built-ins which the single-application build does).
strip -R .note -R .comment bin/* strip -R .note -R .comment $QTDIR/lib/libqte.so* $QTDIR/lib/libqpe.so* strip -R .note -R .comment plugins/*/*
Note that the memory consumption with this type of build is currently excessive
due to the details of ELF, but there are a number of tools in production to
alleviate this, such as
ELF Prelink.
Build for SL5000
To build Qtopia from the sources:
To build Qtopia from the sources: