I have an editable QComboBox inside a QDialog. When I type some text in the QComboBox and I press return, I would like my dialog to do some things. So I've tried to connect the returnPressed() signal from QComboBox::lineEdit() to my slot, but when I press return, the dialog is accepted. That should be the normal behaviour when the focus is in other widgets and the user presses return, but not in this widget. Does someone know how to prevent the QDialog from being closed in this case?