Hi ,I am using Qt 4.4.0 .In my application I want to access the members/variables of one dialog class in another dialog class.Now I am able to access the variables/members of Mainwindow class in any other dialog.The code i used to access is shown below

Qt Code:
  1. MainWindow *omans = qobject_cast<MainWindow *>(parentWidget());
  2. omans->natimer->stop();
To copy to clipboard, switch view to plain text mode 

I wrote the above code in other dialog class to access the "natimer " which i was declared in mainwindow.
Now I want to access the member of one dialog class in another dialog class.
I tried the same code to access the member of one dialog class in another dialog class,but the execution get breaks .
So help me to solve the problem.

With Regards,
Sudheer.