这是使用PyQT5作为UI的首次提交,将后端和UI合并到1个工程中,统一使用了Python,没有使用JS和HTML

This commit is contained in:
2025-12-14 12:13:19 +08:00
commit 872b181703
122 changed files with 70944 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
简单的测试窗口用于验证PyQt5环境
"""
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QVBoxLayout, QWidget
class TestWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("测试窗口")
self.setGeometry(100, 100, 400, 300)
# 创建中心部件
central_widget = QWidget()
self.setCentralWidget(central_widget)
# 创建布局
layout = QVBoxLayout(central_widget)
# 添加标签
label = QLabel("如果能看到这个窗口说明PyQt5环境正常")
layout.addWidget(label)
def main():
app = QApplication(sys.argv)
window = TestWindow()
window.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()