Qt :: How little can this be done?

I am using Qt for an embedded Linux application and want to make it as small as possible. At the moment, if I make a statically compiled executable, it will be 3.9Mb, basically only using the parts of the GUI that I need. I got it up to 3.9Mb, just using qconfig and configuration options. I was thinking about how much less this can be done by changing the source code before installing it, if someone did something like this, how little did you get it? thanks

+7
qt install configure
source share
1 answer

I worked on this in a cold fire system (no mmu value, small memory, i.e. size matters).

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

The result was, if I remember correctly, the size of the library ~ 960 KB. It was pretty unusable, but as a result, we had to redefine quite a few widgets. However, we did not have a touch or a proper keyboard, so we could write small compact widgets. When we did this, we hard-coded the style in the widgets, reducing the need for QStyle, etc.

+5
source share

All Articles