QProgressDialog won’t block user inputs in MainWindow before it appears
I love using the QProgressDialog as WindowModal to block user inputs in the MainWindow while the user command is being executed. But to avoid annoying the user with the QProgressDialog for short running commands, I set the minimumDuration to 3 seconds. So now the QProgressDialog window only appears after 3 seconds has elapsed. However, during that 3 seconds, user inputs are enabled on the MainWindow, which I don’t want. I love the way the Window Modality prevents user inputs. The MainWindow looks the same, but the user just gets a short beep when he clicks in it. I’d like that to happen during the 3 seconds before the QProgressDialog appears, but it doesn’t. The only other alternative I can think of is to disable the main window, but that redraws the whole window to look disabled. I don’t want to do that. Can anybody think of a way to get the QProgressDialog to block user inputs in the Main Window and remain invisible? Or, alternatively, is there a way to block user inputs without bringing up a QDialog that is visible to the user?