If you have two variables (A and B) where and you connect B's destroyed() signal to A, it sometimes goes to A's slot and sometimes not. It depends of the class hierarchy if the slot is run. I attached an example application to reproduce the issue. In the application there is a flag that you can use to modify the hierarchy to reproduce the issue or make it to work fine.
This bug report might be a duplicate of