int QDialog::exec () [slot] //这是个槽,本质上就是一普通的成员函数
Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.
If the dialog is
application modal, users cannot interact with any other window in the same application until they close the dialog.
If the dialog is
window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.
中文翻译:如果这个对话框是程序模式,用户不能在同一个应用程序里访问其它窗口,除非我们把这个对话框关闭;
如果这个对话框是窗口模式,只要这个对话框是处于打开状态的,它就不能和父窗口进行通信;
PS:modal dialog包括
window modal,
application modal;
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.