Connect to the accepted() signal from the dialog.