PySide2 Publishing Program
1. Official release program
For the QT interface program we developed earlier, you only need to execute the following command on Windows to create an independent exe program.
1 |
|
--noconsole
Specify no command line window, otherwise when our program runs, there will be another black window.
--hidden-import PySide2.QtXml
The parameter is because this QtXml library is dynamically imported, and PyInstaller cannot analyze it, we need to tell it.
Finally, don’t forget to copy the ui files
needed by the program to the package directory.
2. Program icon
2.1 The icon of the program running window
1 |
|
2.2 The program file icon
It can be specified by the parameter --icon="logo.ico"
when PyInstaller creates an executable program.
1 |
|
If you only have png files, you can use the online png to ico file website to generate ico, such as the following two websites:
PySide2 Publishing Program
https://www.hardyhu.cn/2022/08/06/PySide2-Publishing-Program/