Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt::How small can it be made?

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

like image 857
Ayeayeron Avatar asked Feb 17 '10 21:02

Ayeayeron


1 Answers

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.

like image 115
e8johan Avatar answered Oct 23 '22 01:10

e8johan