views:

166

answers:

1

I'm using Qt for an embedded Linux app and want to make it as small as possible. At the moment If I make a statically compiled executable it will be 3.9Mb, pretty much only using the GUI parts I need. I got it to 3.9Mb just by using qconfig and configuration parameters. I was thinking about seeing how much smaller it could be made by modifying the source code before installing it, if someone has done something like this how small have you got it? thanks

A: 

I've worked on this on a coldfire system (no mmu, small memory, i.e. size is of importance).

As the entire GUI consisted of custom widgets, we stripped out all classes except QWidget using qconfig. We also took the liberty of removing all resources from the projects files (i.e. stock icons, etc).

The result was, if I recall correctly, a library size of ~960kB. That was rather unusable though, resulting in us having to reimplementing quite a few widgets. However, we did not have touch nor a proper keyboard so we could write small, compact widgets. As we did this, we hardcoded the styling into the widgets, reducing the need for having QStyle's, etc.

e8johan