Quote Originally Posted by bcalmac View Post
My precise concern is that the size of the exe is about the size of the QtCore + QtGUI libraries, which means that a simple button requires to link the whole framework, which doesn't seem right.
It links more than just Qt libraries. Probably you also have the whole mingw legacy somewhere in your app

For comparison (if needed) a "Hello world" MFC application is below 100K, it just links a minimal set of used functions from the library.
You can't compare it like that, the frameworks are completely different.

Is QT designed in such a way that a simple button has a dependency on all the functions in the library?
You're not using the button only. You're using QApplication and its all dependencies, along with sql, image and probably other plugins. Probably MSVC does some optimisations which are not turned on in MinGW. First thing I would do is to pass -Os to mingw. The second thing would be to strip the application from symbols (I don't know how it is done on Windows, under U*ix you simply write "strip appbinaryname" and you get a much smaller binary. BTW. You should also compile Qt with -Os if you're after minimising the binary size.

BTW2. It is "Qt", not "QT". The latter is Apple technology.