Python configuration Qt Designer and PyUIC

Python configuration Qt Designer and PyUIC

  1. Install pyqt related packages
pip install pyqt
pip install pyqt5-tools
  1. Select the corresponding python interpreter in PyCharm

Select python3.7 interpreter
3. Add external tools

external tools
Fill in the name for your convenience and easy to remember. My name is added as the QTDesigner
program and select designer.exe. The location is Lib\site-packages\pyqt5-tools\designer.exe under the current interpreter path. The
working directory is the directory of the current project file.
insert image description here
After adding the selection interface is:
insert image description here
OK, add PyUIC again (the same process)

PyUIC

The program path is Scripts\pyuic5.exe under the current interpreter.
Remember: you must add parameters here, otherwise an error will be reported later: Error: one input ui-file must be specified.
The parameter is added as: Remember to add $FileName$ -o $FileNameWithoutExtension$.py".py" at the end .

insert image description here

OK, all added.
In the menu bar: Tools→External Tools to find the added application
insert image description here

Guess you like

Origin blog.csdn.net/qq_31460605/article/details/123854897