Angus Leeming wrote: > Finally, I'm baffled by this: > > void QSpellcheckerDialog::reject() > { > form_->slotWMHide(); > QSpellcheckerDialogBase::reject(); > } > > $ grep reject build/src/frontends/qt2/ui/QSpellchecker*.[Ch] > $ grep reject src/frontends/qt2/QSpellchecker*.[Ch] > src/frontends/qt2/QSpellcheckerDialog.C:void > QSpellcheckerDialog::reject() > src/frontends/qt2/QSpellcheckerDialog.C: > QSpellcheckerDialogBase::reject(); > src/frontends/qt2/QSpellcheckerDialog.h: virtual void > reject(); > > Note 1. The QSpellcheckerDialog::reject is not invoked by anything. > Note 2. QSpellcheckerDialogBase::reject member function doesn't > exist. How does the code compile?
Ahhhh. QSpellcheckerDialogBase inherits from QDialog which has a reject() member function. qdialog.html has this magic snippet of information: 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. Sorry for the noisy learning curce ;-) -- Angus