PDA

View Full Version : creating a signal from manually closing a Dialog



Alex22
31st December 2015, 20:38
Hi,
there is an object from QDialog in name of "dlg". it is needed while closing it manually by clicking on close button on top-left, it emits a signal. how is it possible to create a signal for this?

thanks for any help

ChrisW67
31st December 2015, 21:00
Override the class QDialog::closeEvent() and emit whatever you like before calling the base implementation. You probably already get a rejected() signal if the dialog is closed this way.