Have you tried to use deleteLater()?
Your example looks very wired to me.
Deleting object in that way is a signed for bad design.
What you also can do is connecting to the QObject::destroyed(…) signal in QML
↧