I had a windows application (non Qt), and I integrated Qt some years later, and now, I have a Qt dialog which I would like to be modal for the whole application.

Is this possible?

I have a class which derives QDialog. I tried both:
setModal( true ); in its constructor, and:
setWindowModality( Qt::ApplicationModal ); both in its constructor and from the place that I call it.

I call it like:
BrowseDialog dlg(...);
int result = dlg.exec();

I don't pass him any parent.

Is it possible to have that dialog modal for the whole application?