python使用PyQt5的简单方法
2019-04-27 本文已影响37人
9ba4bd5525b9
一:安装PyQt5
pip install pyqt5
二:PyQt5简单使用
1:使用PyQt5创建一个简单窗口

现象如下:

2:给创建的窗口添加标题和图标

现象如下:

3:给创建的窗口设置按钮及设置提示语

现象如下(点击button按钮,窗口关闭):

4:设置标签(lable)信息

现象如下:

5:配置输入框

现象如下:

三:将上述方法总结一下实现了一个简单的功能,如下:
功能为:在输入框中输入值过后,点击按钮就会打印出你输入的值,关闭窗口会有提示

现象为:
