I have a main window where I am collecting information form the use and then passing that to a function. This function does a bunch of interaction with an API and returns a document. My issue is that the user doesn't get any indication that the program is doing anything.
The API function does not return any percentage complete. I have tried creating a QProgressBar and just giving it fake percentages with limited success. What I think I need is some sort of dialog box that can pop up before calling the big function, and then hide it when complete.
I have created a dialog box that basically says "Please wait...working". Unfortunately the program halts while the dialog box is open and will not continue until the dialog box is closed.
I have a class to open the "Wait Window":
class WaitDialog(QtWidgets.QDialog, UiWaitWindow):
def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent)
self.setup_ui(self)
I open the box right before executing the function by:
dlg = WaitWindow()
dlg.exec_()
What is the best way to let the user know that the program is working and not hung?