pip install PyQt5
pip install PyQt5-tools
https://www.w3schools.cn/pyqt5/pyqt5_hello_world.html
https://doc.qt.io/qtforpython-5/contents.html
https://zhuanlan.zhihu.com/p/162866700
https://blog.csdn.net/youcans/article/details/120925109
https://zhuanlan.zhihu.com/p/457972006
https://www.w3schools.cn/pyqt5/pyqt5_multiple_document_interface.html
from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QLabel, QPushButton from PyQt5 import QtCore, QtGui import sys import os app = QApplication(sys.argv) widget = QWidget() widget.resize(640, 480) widget.setWindowTitle("Hello, PyQt5!") # Label Text label = QLabel(widget) label.resize(300, 100) label.setText("Hi this is Pyqt5,涂聚文学习中") label.move(100, 100) button = QPushButton(widget) button.resize(200, 100) button.setText("Hi! Click Me") button.move(400, 300) button.clicked.connect(click) widget.show() sys.exit(app.exec())
输出:
标签:widget,pyqt5,python,button,PyQt5,label,pyQt5,import From: https://www.cnblogs.com/geovindu/p/17510108.html