homerun4711
15th February 2011, 15:38
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:
InvoiceEdit *editInvoice = new InvoiceEdit();
if (editInvoice->exec())
{
...
}
This class contains a private function like
int InvoiceEdit::saveInvoice()
{
...
this->close();
return 0;
}
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
I have a question about returning a value from a QDialog that ist about to be closed.
An instance of InvoiceEdit is created first:
InvoiceEdit *editInvoice = new InvoiceEdit();
if (editInvoice->exec())
{
...
}
This class contains a private function like
int InvoiceEdit::saveInvoice()
{
...
this->close();
return 0;
}
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