Setting a Default Button
A dialog box can have a default button. The default button is the one that is activated when the user presses the Enter key when the dialog box has the keyboard focus.
The default button has a special appearance that distinguishes it from other buttons. To set a default button, use the setDefaultButton member function.
Note that when a default button has been defined, pressing the Enter key only applies to this button. In certain cases you might want to override this behavior. For example, when editing a matrix you might want to use the Enter key to validate changes. To modify this behavior, you can use the member function usesDefaultButtonKeys.