PDA

View Full Version : How to inactivate qdialog



gosk
21st October 2011, 06:36
Hi,

In my program I have 2 qdialogs. In first dialog when a certain push button is clicked I want to pop up the second dialog but at the same time I want to run the rest of the code in the first dialog.
I did something like this in my first dialog box.

//code1
Dialog2 *d11=new Dialog2();
d11->exec();
//code2

But when it is running the 2nd dialog appears and the code beyond the originating of 2nd dialog (code2) doesn't run. What should I do in order to pop up 2nd dialog and be inactive during the execution?

ChrisW67
21st October 2011, 07:22
Call show() not exec() if you want a non-modal dialog.

Oh, and make sure you arrange to free the memory you allocated for dialog2.