How to disable a window when a new dialog in on top of it?
-
I have mainwindow.ui with some buttons.Finish,Exit,New Dialog etc...
When "New Dialog" is clicked I'm creating a dialog box with "OK" and "Cancel" buttons.This dialog box appears on top of my mainwindow.I have a requirement that, only after user clicks "Ok" or "Cancel" in the dialog the buttons in the mainwindow should be functional otherwise the buttons in the background should not be functional.Please suggest. -
And here is a bit more info on how it works: https://doc.qt.io/qt-5/qt.html#WindowModality-enum
-
I have mainwindow.ui with some buttons.Finish,Exit,New Dialog etc...
When "New Dialog" is clicked I'm creating a dialog box with "OK" and "Cancel" buttons.This dialog box appears on top of my mainwindow.I have a requirement that, only after user clicks "Ok" or "Cancel" in the dialog the buttons in the mainwindow should be functional otherwise the buttons in the background should not be functional.Please suggest.