Setting default=false was not enough.
QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close);
connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
- closeButton->setDefault(false); // Because people press enter in the dialog and we don't want to close for that
+
+ // Because people press enter in the dialog and we don't want to close for that
+ closeButton->setDefault(false);
+ closeButton->setAutoDefault(false);
// Set icon
QFileInfo f_info(_localPath);