This error can be caused by many things but I know about one more which I didn't find anywhere else ;-).
In case you compile and deploy your app by using qtmacdeploy and sign your application immediately, everything will probably works fine. The problem occurs, when you need to copy your application to different location (for example during dmg building). In such cases, this error can occur:
Althought codesign is executed as always, singing isn't successful:
The problem is, that during the copy it's necessary to keep all symbolic links inside frameworks. Without this, singing will fail.
So instead of
it's necessary to use