One 、PyCharm in QtDesigner Extension tools add and set
1、 Open file , Click Settings
2、 Select tool --> External tools
3、 Select Add... In the upper right corner
4、 Fill in... In turn name 、 describe
5、 Application configuration : choice Under the current interpreter designer.exe file . How to query the location of the current interpreter , This article will not explain .
6、 working directory : Select right plus
7. successively Click on the confirmation 、 It can be applied
Two 、ui File conversion py file , Extension tool add
1、 Same configuration as above , Into the first Set up --> Tools --> External tools
2、 Then add , Parameters
3、 Configure working directory
4、 test
One 、PyCharm in QtDesigner Extension tools add and set
1、 Open file , Click Settings
2、 Select tool –> External tools
3、 Select Add... In the upper right corner
4、 Fill in... In turn name 、 describe
5、 Application configuration : choice Under the current interpreter designer.exe file . How to query the location of the current interpreter , This article will not explain .
6、 working directory : Select right plus
7. successively Click on the confirmation 、 It can be applied
Right click choice External Tools -->QTDesigner, eject designer, Then the configuration is complete
Two 、ui File conversion py file , Extension tool add
You can use the command line sentence To achieve , But it's too cumbersome , This article only speak Methods implemented using extension tools
1、 Same configuration as above , Into the first Set up –> Tools –> External tools
2、 Then add , Parameters
Among them to Program : This step is the same as above , But we must ***.ui file Convert to with the same name ***.py file , You need to configure the corresponding arguments , as follows
-m PyQt5.uic.pyuic F i l e N a m e FileName FileName -o F i l e N a m e W i t h o u t A l l E x t e n s i o n s FileNameWithoutAllExtensions FileNameWithoutAllExtensions.py
3、 Configure working directory
Click OK one by one 、 application Can finish
4、 test
choice ui file , Right click and select extension tool