Ahh, that's it! I didn't realize to press enter but only switched focus to other widget (which causes editingFinished() to be emitted as well)..Anyway, the "emit button" is the default button of the dialog so that's why it gets clicked by pressing enter. In C++, you would add
and the problem is gone. Refer to QPushButton docs for more information about "default buttons" and "auto default buttons".Qt Code:
emitButton->setAutoDefault(false);To copy to clipboard, switch view to plain text mode
Bookmarks