Use pyqt5 + GUI program written in python:
1. Use a multi-threaded QThread:
Problem: no problem with local debugging, running after packaged exe, appears QThread: destroyed while thread is still running error
Solution: When using thread class, plus self. Or to thread class is instantiated in the main entry, do not increase self.
2.pyinstaller packaged static resources used by the program did not bring
Problem: Can not find static files, pictures and other run-time
Solution: When using pyinstaller package, will automatically generate the configuration file *** spec.. Modify datas parameters in the configuration file. Configuring static resource directory res, such as :( "res", "res")
Then use pyinstaller ***. Spec package.
Another: If the package is repeated many times there is a problem, remove the build, dist folder, repackaging