QLineEdit自带一个signal,可以响应回车
void QLineEdit::returnPressed () [signal]
This signal is emitted when the Return or Enter key is pressed. Note that if there is a validator() or inputMask() set on the line edit, the returnPressed() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.