Hello every one. I am making a desktop GUI application using PyQt5 on Windows 7.
In my application, there is a heavy workload. It is making a hash code of all files in specified directories and downloads from ftp if the files hash code is not equal with ftps file. On my system this takes about 5-6 minutes.
In my thought...
show widget first. ( of course, the 'self.show()' is prior to code of compare hash. )
compare hash code and download the files.
Code works properly, but widget show after 2.
ends. And this is a problem.
I want to my application runs step 1 first then step 2. What should I do?
Any help is apreciated
Code:
class showUI(QWidget):
# make menu, toolbar, buttons, etc..
self.show()
class compareHashAndDownload:
# compare hash and download the files.
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = showUI()
mainProcess = compareHashAndDownload()
sys.exit(app.exec_())