PDA

View Full Version : Problem with QDialog



sudheer168
2nd December 2009, 12:49
HI every body ,
I am working on QT4.4.0 integrated with MSVS2005. I created application where I opened MainWindow which is derived fromQMainwindow and in main window on button click event I opened an dialog . For that dialog I enabled Qt::WStyle_MinMax property . Now I run my application , on main window I opened the dialog, If I minimize the dialog the mainwindow also minimizing . I am not able to get the problem.

I openend dialog as


diaolg dg(this);
this.exec();



Now I also want to do updates from dialog class ie think there is a radiabutton in mainwindow now I want to make checked in dialog class . But In my application if I do so it was not updating , it is updating only when I close the dialog . I cant get why it was happening .
So please help me to solve this problem.

Regards,
sudheer.

high_flyer
2nd December 2009, 13:04
The behavior your are describing has to do with the fact that your dialog is a modal dialog.
Read the QDialog docs, and get an understanding what does modal dialog mean.
If you then have further questions feel free to post again.

phillip_Qt
2nd December 2009, 13:26
HI every body ,
If I minimize the dialog the mainwindow also minimizing . I am not able to get the problem.


add a mdiarea. add ur dialog to it. Now if u'll minimize the dialog, mainwindow wont be minimized.