Legality of usage UPX
I have free open source project.
To distribute it on Windows platform I need to include necessary Qt libraries in dll.
To reduce size of package I want to feed UPX(executable packer) with dlls.
Is it legal to do?
As long as you comply with the terms of the licence you are using Qt and UPX under.
I see little point packing individual DLLs to save a couple of megabytes of installed size. Any downloadable installer you make with NSIS (or similar) will compress the DLLs to reduce the transport size anyway.