这套教程的主题很明确:用 Python 的 PyQt5 做桌面端界面,用 SQL 做数据持久化,把一套学校管理软件从零搭到能跑。它属于典型的"单机桌面应用 + 关系型数据库"技术组合,适合想练手完整项目、又不想被 Web 框架那套前后端分离绕晕的开发者。

技术栈的定位:桌面端而非 Web

PyQt5 在国内的实际使用场景比很多人想象的要广——企业内部工具、教务系统客户端、数据录入端、上位机界面,都是它的地盘。相比 Django、Flask 这类 Web 框架,PyQt5 的优势是部署简单:一个 exe 或一个 Python 环境就能跑,不需要配服务器、不需要考虑浏览器兼容。代价是界面代码和业务逻辑容易耦合,这对工程能力反而是个考验。

这门课把 SQL 摆在同等位置,说明它不是只教拖控件。学校管理软件的数据模型天然包含几类实体:学生、班级、课程、成绩、教师。它们之间的关系(一对多、多对多)正好是练数据库设计的合适规模——比"用户表 + 文章表"的博客 demo 复杂,又不至于复杂到失控。跟着做一遍,能实际体会到外键约束、关联查询、事务提交这些概念在真实业务里怎么落地。

模块拆分:按业务域而不是按文件类型

从资料线索能看出,项目是按功能模块推进的:学生模块、成绩模块(marks)、以及最后的收尾调整。这种组织方式值得注意,因为它对应的是"一个模块从界面到 SQL 完整走通"的开发节奏,而不是先把所有界面画完再统一接数据库。

对自学者来说,这个节奏更接近真实工作。真实项目里你不会有机会先把 UI 全画完,通常是拿到一个需求(比如"加一个成绩录入页"),然后自己判断需要哪张表、哪些字段、界面怎么布局、增删改查怎么绑事件。教程按模块切分,正好让你反复经历这个循环。

  • 关注每个模块的数据库表结构是怎么定的,字段类型和约束为什么这么选;
  • 关注 PyQt5 的 Model/View 机制是怎么用的,是直接往 QTableWidget 里塞数据,还是用 QSqlTableModel 绑定;
  • 关注信号槽(signal/slot)在"点按钮→写库→刷新列表"这条链路上怎么串起来;
  • 关注最后一节的收尾改动,通常这类内容藏着实际开发中才会遇到的边界问题。

怎么用这份资料才不浪费

最没效率的用法是开视频、暂停、抄代码、运行、继续。这样走完一遍,合上电脑还是不会写。更有效的做法是分两轮:第一轮快速过一遍,只看结构,搞清楚这套软件有多少个模块、每个模块管什么数据、模块之间有没有共享的状态;第二轮针对某一个模块,先不看视频,自己按理解写一版,写完再对照,看差异在哪。

差异才是学习点。比如你可能用 QTableWidget 手动填数据,而教程用的是 QSqlTableModel 直接绑定数据库表——后者代码更少但要求你对 SQL 层理解更深。这种对比会逼你想清楚两种方案的取舍。

另外,PyQt5 的坑比较集中:界面卡死(主线程做耗时操作)、资源路径在打包后失效、中文字体显示、QThread 和信号跨线程通信。教程里如果涉及这些,值得单独记下来。学校管理软件里如果要做成绩统计、批量导入,早晚会撞上主线程阻塞的问题。

适合谁,不适合谁

适合已经有 Python 基础语法、会写函数和类,但没独立做过完整项目的人。也适合想转桌面端、或者手头有类似内部工具需求的人——学校管理只是一个载体,把学生换成客户、把成绩换成订单,很多结构可以迁移。

不适合零基础学 Python 的人,因为课程重心在项目结构和 PyQt5/SQL 的配合,不会花时间讲循环和列表。也不适合想学 Web 后端的人,桌面端和 Web 端在数据流、并发模型上差别不小,硬套容易形成错误的直觉。

如果打算跟着做,建议本地准备好 Python 环境、一个能看数据库文件的工具(比如 DB Browser for SQLite),并且从一开始就用 Git 管理代码。按模块提交,做完一个模块打一个 tag,回退和对比都方便。

课程目录

📁 21. Extra Changes in this project 21. Extra Changes in this project必看.png [493.5 KB] 1. Extra changes_CN.srt [11.0 KB] 1. Extra changes.srt [11.0 KB] 1. Extra changes.mp4
 [201.8 MB] 📁 17. Mark module python code 17. Mark module python code说明.png [493.5 KB] 2. Edit marks.srt [12.2 KB] 1. Add marks.mp4
 [194.3 MB] 3. Delete marks_CN.srt [6.4 KB] 2. Edit marks_CN.srt [12.1 KB] 2. Edit marks.mp4
 [215.6 MB] 3. Delete marks.srt [6.4 KB] 1. Add marks.srt [12.4 KB] 1. Add marks_CN.srt [12.4 KB] 3. Delete marks.mp4
 [85.4 MB] 📁 22. Export reports from QTableWidget to Excel File 22. Export reports from QTableWidget to Excel File文档.zip
 [1.8 MB] 3. The modified Gui for export to excel.html
 [198.5 KB] 1. Export to Excel from Pyqt5 tables.mp4
 [202.2 MB] 2. Download the modified python code.html
 [56.1 KB] 1. Export to Excel from Pyqt5 tables_CN.srt [16.4 KB] 1. Export to Excel from Pyqt5 tables.srt [16.5 KB] 📁 8. User interface creation Attendance management module 8. User interface creation Attendance management module必看.png [493.5 KB] 2. Edit or delete attendance details.mp4
 [35.2 MB] 2. Edit or delete attendance details_CN.srt [2.4 KB] 2. Edit or delete attendance details.srt [2.4 KB] 1. Add attendance Details.mp4
 [51.6 MB] 1. Add attendance Details.srt [3.0 KB] 1. Add attendance Details_CN.srt [3.1 KB] 📁 16. Student module python code 16. Student module python code说明.png [493.5 KB] 2. Add student 2.srt [11.0 KB] 5. Delete student.mp4
 [107.7 MB] 3. edit student 1.srt [11.7 KB] 2. Add student 2.mp4
 [171.9 MB] 4. Edit student part 2_CN.srt [7.1 KB] 1. Add student part 1_CN.srt [9.2 KB] 5. Delete student_CN.srt [7.7 KB] 3. edit student 1.mp4
 [187.1 MB] 3. edit student 1_CN.srt [11.9 KB] 1. Add student part 1.mp4
 [109.6 MB] 1. Add student part 1.srt [9.4 KB] 5. Delete student.srt [7.6 KB] 4. Edit student part 2.srt [7.1 KB] 4. Edit student part 2.mp4
 [117.4 MB] 2. Add student 2_CN.srt [11.0 KB] 📁 5. Interface Design - Login form and home page design 5. Interface Design - Login form and home page design资料.png [493.5 KB] 1. Login form creation.srt [6.0 KB] 2. Home page creation_CN.srt [1.5 KB] 2. Home page creation.srt [1.5 KB] 2. Home page creation.mp4
 [20.3 MB] 1. Login form creation.mp4
 [109.3 MB] 1. Login form creation_CN.srt [6.1 KB] 📁 20. Reports Generation 20. Reports Generation必看.zip
 [1.8 MB] 2. Report Design Style Generation.mp4
 [148.3 MB] 1. Reports Generation.mp4
 [132.0 MB] 2. Report Design Style Generation_CN.srt [7.4 KB] 1. Reports Generation_CN.srt [6.7 KB] 1. Reports Generation.srt [6.5 KB] 2. Report Design Style Generation.srt [7.2 KB] 📁 11. User interface creation Receipt generation module 11. User interface creation Receipt generation module必看.zip
 [1.8 MB] 1. Receipt generation.mp4
 [99.8 MB] 1. Receipt generation_CN.srt [4.6 KB] 1. Receipt generation.srt [4.7 KB] 📁 13. Complete project code for python 13. Complete project code for python文档.zip
 [1.8 MB] 1. Copy the complete python code - copy the complete code and save as school.py.html
 [31.2 KB] 📁 6. User interface creation Student details module 6. User interface creation Student details module资料.zip
 [1.8 MB] 2. Edit or Delete student interface design_CN.srt [4.2 KB] 1. Add new student interface design.srt [7.0 KB] 1. Add new student interface design_CN.srt [7.1 KB] 1. Add new student interface design.mp4
 [112.0 MB] 2. Edit or Delete student interface design.mp4
 [86.1 MB] 2. Edit or Delete student interface design.srt [4.1 KB] 📁 2. Software installation 2. Software installation文档.zip
 [1.8 MB] 1. How to install Python_CN.srt [1.6 KB] 4. How to install text editor for our project.srt [1.4 KB] 4. How to install text editor for our project.mp4
 [15.0 MB] 3. How to install xampp and mysql.mp4
 [19.1 MB] 3. How to install xampp and mysql.srt [1.6 KB] 1. How to install Python.srt [1.6 KB] 3. How to install xampp and mysql_CN.srt [1.7 KB] 2. How to install PyQt5 and PyQt5 tools.mp4
 [26.4 MB] 1. How to install Python.mp4
 [16.1 MB] 2. How to install PyQt5 and PyQt5 tools.srt [1.6 KB] 2. How to install PyQt5 and PyQt5 tools_CN.srt [1.8 KB] 4. How to install text editor for our project_CN.srt [1.5 KB] 📁 18. Attendance module python code 1. Add attendance.srt [10.5 KB] 3. Delete Attendance.mp4
 [47.9 MB] 2. Edit attendance.srt [13.6 KB] 3. Delete Attendance_CN.srt [2.8 KB] 2. Edit attendance.mp4
 [208.5 MB] 1. Add attendance.mp4
 [182.2 MB] 2. Edit attendance_CN.srt [13.4 KB] 1. Add attendance_CN.srt [10.5 KB] 3. Delete Attendance.srt [2.8 KB] 📁 19. Fees module python code 4. Delete Fees_CN.srt [4.6 KB] 3. Edit fees_CN.srt [11.8 KB] 1. Addd Fees_CN.srt [11.8 KB] 3. Edit fees.mp4
 [253.6 MB] 2. Fees Receipt Generation.srt [10.4 KB] 2. Fees Receipt Generation_CN.srt [10.5 KB] 2. Fees Receipt Generation.mp4
 [180.8 MB] 1. Addd Fees.srt [11.7 KB] 4. Delete Fees.mp4
 [74.4 MB] 3. Edit fees.srt [11.8 KB] 4. Delete Fees.srt [4.6 KB] 1. Addd Fees.mp4
 [227.4 MB] 📁 4. New project and menu creation using Qt Designer 1. How to create new project and menu.mp4
 [46.8 MB] 1. How to create new project and menu.srt [2.9 KB] 2. How to set menu colors and object names in the menu.mp4
 [45.8 MB] 2. How to set menu colors and object names in the menu.srt [3.3 KB] 2. How to set menu colors and object names in the menu_CN.srt [3.2 KB] 1. How to create new project and menu_CN.srt [3.1 KB] 📁 1. Introduction 1. The complete output of the Python PyQt5 & MySql project we are goint go develop_CN.srt [4.7 KB] 1. The complete output of the Python PyQt5 & MySql project we are goint go develop.mp4
 [28.8 MB] 1. The complete output of the Python PyQt5 & MySql project we are goint go develop.srt [5.0 KB] 📁 12. Database and table creation in mysql database and Php my admin 1. How to create school database in mysql using phpmyadmin control panel_CN.srt [2.2 KB] 2. How to create student, mark, attendance and fees tables in school database_CN.srt [5.7 KB] 2. How to create student, mark, attendance and fees tables in school database.srt [5.5 KB] 1. How to create school database in mysql using phpmyadmin control panel.srt [2.2 KB] 2. How to create student, mark, attendance and fees tables in school database.mp4
 [86.6 MB] 1. How to create school database in mysql using phpmyadmin control panel.mp4
 [18.5 MB] 📁 15. Python code to login form 1. Login form.srt [8.2 KB] 1. Login form.mp4
 [96.1 MB] 1. Login form_CN.srt [8.3 KB] 📁 14. Python code How to connect Pyqt5 User interface with Python 1. Connect ui to python code.mp4
 [40.0 MB] 1. Connect ui to python code_CN.srt [4.9 KB] 1. Connect ui to python code.srt [4.9 KB] 📁 7. User interface creation Mark management module 2. Edit or delete mark details design.mp4
 [29.4 MB] 1. Add mark details.mp4
 [51.6 MB] 2. Edit or delete mark details design_CN.srt [1.7 KB] 1. Add mark details.srt [2.9 KB] 1. Add mark details_CN.srt [3.0 KB] 2. Edit or delete mark details design.srt [1.7 KB] 📁 10. User interface creation Reports generation module 1. Report generation.mp4
 [22.0 MB] 1. Report generation_CN.srt [1.8 KB] 1. Report generation.srt [1.8 KB] 📁 9. User interface creation Fees management module 2. Edit or delette fees form_CN.srt [1.4 KB] 2. Edit or delette fees form.srt [1.3 KB] 1. Add fees details form_CN.srt [2.7 KB] 2. Edit or delette fees form.mp4
 [25.2 MB] 1. Add fees details form.mp4
 [44.1 MB] 1. Add fees details form.srt [2.7 KB] 📁 3. Download images for ui design 2. Complete ui file code - copy the contents of the code and save as school.ui.html
 [184.1 KB] 1. Right click on each image - select - save image as - and save it.html
 [423.0 B] fileTree【】.txt [7.2 KB] 适合人群 Python开发者 软件工程学生 教育行业从业者 🎯 学习收获 掌握Python PyQt5界面设计 学会SQL数据库操作 打造学校管理软件项目 🎉 祝您学习愉快!