Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.
void QDialog::accepted () [signal]//这是个信号,本质上也就是成员函数
This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.
Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.