Viewing the code in QtDesigner shows that the code cannot be generated. We need to do two things:
1. Add in external tools:
Name: PyUIC
Program: python.exe
Working directory in your python installation directory: project address
Arguments:
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
2. Add in external tools:
Name: Pyrcc
Program: python.exe in your python installation directory (same as above)
Working directory: project address
Arguments:
$FileName$ -o $FileNameWithoutExtension$_rc.py
The above is all the preparations.
The following is a running example:
1. Create a new Qt and save the ui file
2. Right-click the ui file just now in pycharm, select "PyUIC" in the external tools, and the py file will come out.