But that's the standard way how dialogs work. The question is, what features of QDialog are you actually using? Maybe it shouldn't be a dialog after all but an usual window?
From QDialog docs:
Ugly workaround: catch or filter the event. Better solution: use a plain QWidget instead.Escape Key
If the user presses the Esc key in a dialog, QDialog::reject() will be called. This will cause the window to close: the closeEvent cannot be ignored.
Bookmarks