Hello!

I have a question about returning a value from a QDialog that ist about to be closed.

An instance of InvoiceEdit is created first:

Qt Code:
  1. InvoiceEdit *editInvoice = new InvoiceEdit();
  2.  
  3. if (editInvoice->exec())
  4. {
  5. ...
  6. }
To copy to clipboard, switch view to plain text mode 

This class contains a private function like

Qt Code:
  1. int InvoiceEdit::saveInvoice()
  2. {
  3. ...
  4. this->close();
  5. return 0;
  6. }
To copy to clipboard, switch view to plain text mode 

Will the value be returned or is the instance of InvoiceEdit destroyed due to the call of close() ? And since the value is passed (if it is..) to another private function, when will the closeEvent kick in and destroy the instance? Are all functions completed before is is closed?

Kind regrads,
HomeR