Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Application size



  • I built Qt 5.11.2 on Win 10 statically using MinGW 5.3.0 32bit with default configuration (i just set opengl to dynamic).

    Now, with blank (no code in) main() my binary has 15 kB in size.

    If I add any Qt code to my blank main, e.g.:

    if(QDir("AAA").exists()) {
        return 2;
    }
    

    my binary has almost 5 MB size. Does linker just link complete QtCore to my binary, even though only small subset is really used in my app?

    Is it possible to lower the size of my app?


  • Lifetime Qt Champion

    hi
    5 MB sounds pretty ok. it uses more than one should think
    as there is also signals and slots etc.
    You can use exe packer
    https://upx.github.io/
    which normally makes the deployment file pretty small.


Log in to reply