python: PyQt5 beginner
from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QLabel, QPushButton
from PyQt5 import QtCore, QtGui
import sys
import os
def click():
print("Hy Button is clicked!")
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm,Geovin Du,涂聚文')
#StudentId = 1, StudentName = 'geovindu', StudentNO = '0001', StudentBirthday = datetime.datetime(2007, 12, 5)
#创建表
#stu=Mapping.StudentMaping.Student()
#stu.CreateTable()
''''''
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())
输出:

哲学管理(学)人生, 文学艺术生活, 自动(计算机学)物理(学)工作, 生物(学)化学逆境, 历史(学)测绘(学)时间, 经济(学)数学金钱(理财), 心理(学)医学情绪, 诗词美容情感, 美学建筑(学)家园, 解构建构(分析)整合学习, 智商情商(IQ、EQ)运筹(学)生存.---Geovin Du(涂聚文)
浙公网安备 33010602011771号