PDA

View Full Version : QDialog setModal()



summer_of_69
16th August 2009, 12:46
Hi All,

How can I make a dialog modal dynamically ?

My application has one working thread , I just want to make my dialog Modal(e.g. setModal(true)) till that thread is done with all the calculations.There I have one API (scriptInExecution()) which returns true if calculation is in progress.

I tried this using setModal(true) but it's not working ,than I used QApplication::processEvent() but still I got nothing.



if(true == scriptInExecution())
{
this->setModal(true);
}
else
{
this->setModal(false);
}

Am I missing something :confused:

Thanks.