Another way is to create .dmg file by hdiutil create instead of macdeployqt -dmg .
mkdir ui-release cd ui-release ln -s /Applications cd .. mv $appfolder ui-release/ hdiutil create -volname $volname -srcfolder ui-release/ -ov -format UDZO $dmgfilename