code: def waitUntilFinished(self):
          
          QtCore.QCoreApplication.processEvents()
          while self.isLoading():
              QtCore.QCoreApplication.processEvents()
docs: Processes the main thread until the loading process has finished.  This
          is a way to force the main thread to be synchronous in its execution.