hello everyone,

i have this application when the main window (a QWidget) calls a child QDialog that is generated to configure some setting.. the quit button for the application is also on that same QDialog form and i can set things up in such a way that quit button is connected to the QDialog::reject() function (QDialog::accept() just closes the QDialog, saving the seetings and returns focus to the main window). the code on the main window looks like

Qt Code:
  1. menu =new menuForm(this,"aMenuForm",FALSE,(Qt::WStyle_Customize | Qt::WStyle_NoBorder));
  2. if (menu->exec()==QDialog::Rejected)
  3. {
  4. saveData();
  5. //delete menu;
  6. close(); //closes the main window
  7. }
  8. delete menu;
To copy to clipboard, switch view to plain text mode 

so menu is executed and a reject call is sent the program must save the data and CLOSE the main form too...
ok now this works BUT what does not work is

Qt Code:
  1. mainForm::destroy()
  2. {saveData();
  3. }
To copy to clipboard, switch view to plain text mode 

cause iin the beginning i was trying to get this to work by calling saveData() on mainForm::destroy()... but it did not run... why not?
thank you in advance for your help.
nass