Shows the "Wait ..." window when the slot function is running
I have a slot function in my GUI that takes a while to complete (10-15 seconds). I would like to gray out the layout and show a "Please wait ..." field that will disappear when the slot function is done.
I need it to be asynchronous since I want to use the widget QProgressBar
in the "Wait ..." window.
How can I do that?
+3
iTayb
source
to share
1 answer
Your long slot should be running in QThread, and your "Wait ..." widget should be modal on the main GUI thread.
You can use a QProgressDialog and maybe choose a windowflag that suits your display needs or custom widgets. But a long running operation must signal the modular lock dialog when it has completed, causing the dialog to be hidden.
+8
jdi
source
to share