Unlocking QMainWindow when QDialog is open
-
When a QDialog is open, Qt prevents you from clicking/accessing your QMainWindow by locking it.
Is there a way to change it so that when a QDialog is open, you can also click/access your QMainWindow?
If not, what could i use to be able to access two windows at the same time?
Thanks.Code used to display my QDialog
@
NetstatMap Map;
Map.setModal(true);
Map.exec();
@ -
Hi,
Does it allow when you setModal to false ?
-
[quote author="p3c0" date="1381662184"]Hi,
Does it allow when you setModal to false ?[/quote]
Nope.
-
Try @ Map.show();@
-
[quote author="p3c0" date="1381662444"]Try @ Map.show();@[/quote]
When using Map.show(); the QDialog closes instantly.
-
Hi,
It's because your dialog is on the stack, you must allocate it on the heap if you want it to survive the function where it's created. To ensure it gets deleted, set the Qt::WA_DeleteOnClose property on it (unless you want to be able to hide/show it but then it's another problem)