当前位置:网站首页>Pyqt environment in pycharm
Pyqt environment in pycharm
2022-06-21 13:50:00 【It Xing】
Download and install PyQT5
- cmd Install in mode
pip install PyQt5

2. Official website ----https://www.riverbankcomputing.com — The latest version 5.14.1
1). Download the version you need 
2). Install and download .whl package —cmd Pattern —pip install +.whl File directory 
pycharm Configure the environment in
1. open pycharm +File+setting+ Search for "External Tools"
2. Click on + ----------------- Enter the create tool window 

3. Fill in the content
1) Fill in Name------ Random names ( Girlfriend's name is OK )
2) Fill in Program ----- Fill in QT Installation directory ( Maybe you don't know your QT Installation directory , I'll teach you )----- Be sure to add. .exe
Next, open the file location ( You can )+ Copy files path+ Paste the Program in
3). Fill in Woking directory( Copy and paste )
$ProjectFileDir$
4) Next ok that will do
4. The increase will .ui File conversion to .py File tool (designer The files generated in the tool are .ui file , You need to .ui File conversion to .py file )
1) Fill in Name------ Random names ( Girlfriend's name is OK )
2) Fill in Program -----python Installation directory ( Method is the same as above. )
3) Fill in Arguments( take .ui File conversion to .py File code )
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
4) Fill in Woking directory
$FileDir$
- Click on ok
6) Click on ok that will do
Test environment
1. open Qt Designer Tools 

2) Select main form + Click Create 
3)Ctrl+s Save the file , then .ui Save the file to the project directory 
4) take ui File conversion to .py file 
5) In the transformation of py Add running code to the file , function py file
app = QtWidgets.QApplication(sys.argv) # You must first instantiate QApplication class , As GUI Main program entry
MainWindow = QtWidgets.QMainWindow() # Instantiation QtWidgets.QMainWindow class , Create your own menu Form type of QMainWindow
ui = Ui_MainWindow() # example UI class
ui.setupUi(MainWindow) # Set the form UI
MainWindow.show() # Display Form
sys.exit(app.exec_()) # When a distribution event from the operating system assigns a call window ,
# The application opens the main loop (mainloop) The process ,
# When the window is created , The main cycle process needs to be ended ,
# Call at this time sys.exit() The method is to , End the main cycle process and exit ,
# And free up memory . Why app.exec_() instead of app.exec()?
# because exec yes python System default keyword , To make a difference , So it's written as exec_
边栏推荐
- Lamp architecture 4 -- MySQL source code compilation and use
- Technology sharing | a clustering incremental statistical SQL requirement in MySQL
- 3D slicer saves segmentation results
- seaborn数据总体分布的可视化策略
- MySQL - table operation
- 给网站添加SSL安全证书
- map. Values() to copy list and ArrayList
- [in depth understanding of tcapulusdb technology] tcapulusdb business data backup
- MySQL - index
- C language elementary level (IX) enumeration
猜你喜欢

Setting of Seaborn drawing style

SCCM creates a client collection based on the installed app and periodically pushes application updates

MySQL - view properties
![[Goo Goo donkey takeout rebate system] customer service configuration tutorial of takeout CPS project - (attached with picture and text building tutorial)](/img/54/d30b9c08e46760dac8c3405716941f.jpg)
[Goo Goo donkey takeout rebate system] customer service configuration tutorial of takeout CPS project - (attached with picture and text building tutorial)

C language elementary level (IX) enumeration

Lamp architecture 4 -- MySQL source code compilation and use

3D slicer import label and view label

###数据库的高可用配置(mysql)

17 commonly used o & M monitoring systems

Swift return button
随机推荐
Voltage detection and current detection based on stm32
Using the path module to prompt errors in ts+vite projects
使用api制作我的足迹地图
Blazer page element authorization -- use of the authorizeview component
Please, don't use pessimistic locks in high concurrency scenarios!
Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
Kube Prometheus grafana installation plug-in and grafana image renderer
MySQL - built in functions
Atguigu---- conditional rendering
Artifacial Intelligent Project
Lamp architecture 5 - MySQL Cluster and master-slave structure
Installation of MySQL 8.0.19 under alicloud lightweight application server linux-centos7
C language elementary level (10) type rename typedef
3. operator
Heat mapping using Seaborn
Tomorrow's interview, I can't sleep in the middle of the night to review the bottom implementation of STL
Postman reports error write eproto 93988952error10000f7ssl routinesopenssl_ internalWRONG_ VERSION_ NUM
Are you still using generator to generate crud code of XXX management system? Let's see what I wrote
Babbitt yuancosmos daily must read: wechat may ban a official account for the first time on the grounds of "involving secondary transactions in digital collections", and the new regulations of the pla
MySQL - transaction management