Making Qt/Embedded Lean and Mean
Although the Qt library is relatively large, you can remove features to make it smaller. We suggest waiting until you know what resources your application requires before making Qt/Embedded leaner because you usually end up with a binary incompatible library once you start stripping classes out of it.
When running the configure script for Qt/Embedded, you can pass the option -qconfig and name of a feature configuration. The options are: minimal, small, medium, large, and local (and if you don't use the -qconfig option, you get everything). Each of those options correspond to a header file in $QTDIR/src/tools/: qconfig-minimal.h, qconfig-small.h, qconfig-medium.h, qconfig-large.h, qconfig.h, and qconfig-local.h.
Trolltech calls those header files "Feature Definition Files." In $QTDIR/doc/html/features.html, you'll find a list of macros, all named QT_NO_<something>. Each of the macros disable a feature in Qt, so when configuring Qt with a custom feature set, write down a list of what you don't need in the file src/tools/qconfig-local.h. You can use one of the other feature definition files as a starting point. Note that the configuration "Everything" corresponds to an empty feature definition file.
Creating a custom Qt usually requires some experimentation and recompiling. It is easy to create a broken feature definition file because the features depend on each other in many ways. The easiest way to strip off some bytes is to remove some of the optional modules from Qt. If you don't need them, you can use:
#define QT_NO_TABLE<br> #define QT_NO_XML<br> #define QT_NO_CANVAS</p>
With just those three macros, you save about 350 KB of the final stripped library.
After a successful build, you can strip off symbols with the command: strip -R .note -R .comment $QTDIR/lib/libqte.so*. Remember to use a strip for Linux/ARM to strip the iPAQ binary. If you strip it with the x86-strip, the library will be broken.
M.K.D. and S.H.