It will delete the dialog once the control returns to the main event loop. The dialog's event loop has deferred delete capabilities disabled.
That means that the dialog becomes deleted after exec() returns? But why works
Qt Code:
  1. d->getSomething();
To copy to clipboard, switch view to plain text mode 
still?

You should listen to accepted() and rejected() signals if you care how the dialog was closed. If you don't care then closed() signal(!) is fine.
I don't care^^
But close() is a slot there is no signal closed()