Closes the dialog and emits the accepted() signal.
When running this code
with the Material style (which has transitions for Dialog), the output is:
When run with the Default style (which has no transitions for Dialog), the output is:
Besides contradicting the documentation, the concrete problem with this is that it breaks code like this:
This worked in my application (which uses the Material style) but failed in my tests, where I use the Default style to speed things up.
I think we should fix this by changing the behaviour, and always emit accepted (and rejected) before closed, since they are emitted synchronously.