PyCharm开发GUI之PyQt安装
程序员文章站
2024-01-24 12:05:28
开发环境 PyCharm 2018.3.3python3.7 1 安装pyqt5 pip install PyQt5-tools 2 配置PyCharm 2.1 配置设计器 其中,program为C:\Users\edwin\AppData\Local\Programs\Python\Python3 ......
开发环境
pycharm 2018.3.3
python3.7
1 安装pyqt5
pip install pyqt5-tools
2 配置pycharm
2.1 配置设计器
其中,program为c:\users\edwin\appdata\local\programs\python\python37\lib\site-packages\pyqt5_tools\designer.exe
arguments为$filename$
working directory为$filedir$
使用方法,新建
编缉
2.2 配置ui文件生成为py代码工具
其中,program定义为c:\users\edwin\appdata\local\programs\python\python37\python.exe
arguments为-m pyqt5.uic.pyuic $filename$ -o $filenamewithoutextension$.py
working directory为$filedir$
使用时
3 代码示例
from ui.main import ui_form
from pyqt5 import qtcore
from pyqt5 import qtwidgets
if __name__ == "__main__":
app = qtwidgets.qapplication(sys.argv)
w = qtwidgets.qmainwindow()
ex = ui_form()
ex.setupui(w)
w.show()
sys.exit(app.exec_())
上一篇: PHP中3种生成XML文件方法的速度效率比较_PHP
下一篇: Ajax 火狐 IE使用中的小区别
推荐阅读
-
PyCharm开发GUI之PyQt安装
-
Angular 开发学习之Angular CLI的安装使用
-
2020macOS Big Sur配置Java开发环境之jdk安装过程
-
Python3+PyCharm+PyQt5配置进行GUI开发
-
【Python开发】Python开发相关编译器(Pycharm&Anaconda)的安装
-
python开发之IDEL(Python GUI)的使用方法图文详解
-
pycharm+PyQt5+python最新开发环境配置(踩坑)
-
pycharm配置pyqt5-tools开发环境的方法步骤
-
【golang-GUI开发】qt之signal和slot(一)
-
python开发之IDEL(Python GUI)的使用方法图文详解