PyQt---QtDesigner how to view the code

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
Insert picture description here
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
Insert picture description here
2. Right-click the ui file just now in pycharm, select "PyUIC" in the external tools, and the py file will come out.
Insert picture description here

Guess you like

Origin blog.csdn.net/Forest_2Cat/article/details/105583418