Hi All,

I am using Qt 4.2.2 on my Intel Mac.
I have a MainWindow named MainForm which have a Widget ProgressBar.

Now I m doing the following things.

1. When I click on a toolbar icon in my MainForm and opening a Dialog(HeaderDlg).

2. Then I click the ok button of the open Header dialog which is then accepted on Ok click.

3. Then on that dialog accept I m creating a class Recovery object (Recovery r) in my MainForm class.

4. and then calling some function of Recovery class with that objec in the MainForm class.

5.Then it is doing some working in the recovery class now I want to show the value of a variable counter in the ProgressBar of MainForm class.

I m declaring the Form Pointer and using it as--

extern void *MainFormPtr;
MainForm *mainform1=(MainForm*)MainFormPtr;
mainform->progressBar->setValue(counter);

Now it is not working but when I debug the program the mainform pointer value is 0X00.
But If I declare the object as

MainForm *mainform=new MainForm(0);

Then it is giving pointer value but ot showing the increase value of Progress bar .


If anybody knows what I m doing wrong then plz tell me.

Thanks.