How are you deleting your objects? Are you using delete or deleteLater? Seems odd this is happening since any delete on an object will delete all it's children before itself. At least with Qt parenting. If object X isn't a true child of B then that would cause your issue.

I.e. if I have:

QLabel *label = new QLabel(); QLabel *child = new QLabel(label); delete label; // label should delete child by before it fully deconstructs.

Also if you have real code or at the very least a backtrace I could help more.