Hi,

in the closeEvent() of the dialog, you could do this.deleteLater()

Regards,
Marc