Assuming you want a generic solution, i.e. One that can make a self-extracting compressed file of an arbitrary input file, then you need to write two applications and do some platform-dependent work.

The first application you need is a self-contained, small program that uncompress a stream of data embedded within its own executable. This cannot easily depend on any external library other than those absolutely standard on the target platform; ruling out Qt most likely.

The second application is one that takes an arbitrary file, compresses it and writes a copy of the first program executable, the compressed data, and probably some metadata like original file name and a checksum into a combined file.

The platform-specific part is how you take a complete executable (program 1) and append or insert the compressed data into it so that it will still run and can find the embedded data within itself to uncompress. This can be anything from reasonably easy to quite difficult depending the nature of executables on the platform and things like maintaining exe signatures or avoiding anti-virus defences. A quick Google for "append data to executable" And variations on that theme will get you most of the way fairly quickly for Windows.