I'm using a QDialog. In the constructor I need to do some time-consuming stuff. Therfore it looks like this:

constructor
{
initialize widgets, buttons, etc.
mydialog->show();
do some timeconsuming stuff
mydialog->exec();
}

My question is, is it valid/legal to use show() and exec() in the same constructor?
I tried and everything works well but I want to know for sure.