I have a modeless QDialog box that popup on errors/warning in my Qt application, I want to force the user to only focus on that dialog box and not click anything in the application until they clicked Ok on the dialog box.
I need the dialog box to remain modeless. A solution like hiding the main window or covering it up is not acceptable.
At the moment I'm using setModal(true);
to solve my problem. But I think this method might be stopping the main application from executing.
From the documentation:
If you use
show()
andsetModal(true)
together to perform a long operation, you must callQApplication::processEvents()
periodically during processing to enable the user to interact with the dialog.