How to avoid user to click outside popup Dialog window using Qt and Python?

564 Views Asked by At

I created a Dialog window using Qt Creator and Python. I would like that Window stays on the top of my Gui AND avoid users to click outside that Dialog Until this dialog was closed.

1

There are 1 best solutions below

0
On BEST ANSWER

use setModal() like so;

dialog.setModal(1);

Or;

dialog.setModal(true);