1、使用python+pyqt5,需要安装PyQt5与pyqt5-tools两个工具包如下图
ps建议安装在python环境目录下,如果安装在项目目录下可能会出现问题
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172630901-2118946401.png)
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172430046-596605537.jpg)
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172436898-14233442.jpg)
2、配置qtdesigner环境
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172804147-1517847851.png)
创建.ui文件的工具
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172847125-1722929764.png)
将.ui文件转为.py文件的工具
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524172949473-678072121.png)、
Arguement参数为下图所示
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524173136909-1980801089.png)
完成已上步骤,就可以使用designer工具了
![](https://images2018.cnblogs.com/blog/1404981/201805/1404981-20180524173730427-1112209688.jpg)
如果界面搭建完成后,退出designer工具,右键.ui文件找到 ExternalTool->PyUI,转化为python代码。
网友评论