One: Install PyQt5
1. The first is to install PyQt5 with pip:
pip install PyQt5
2. Then you need to install the Qt tool, and also choose pip to install:
pip install PyQt5-tools
Two: Add QtDesigner and PyUIC
1.file->settings
2.tools->external tools->+
3. Add QtDesigner
(configure according to your own path)
program:
D:\ProgramData\Anaconda3\Library\bin\designer.exe
working directory:
D:\ProgramData\Anaconda3\Library\bin
4. Add PyUIC
program:
D:\ProgramData\Anaconda3\envs\tf1.15\python.exe
arguments:
-m
PyQt5.uic.pyuic
$FileName$
-o
$FileNameWithoutExtension$.py
working directory:$FileDir$
5.apply->ok
At this point, the configuration is complete.
How to convert .ui file to .py file?
Select the ui file you want to convert, right click, external tools->PyUIC