# Qt-PyCalculator **Repository Path**: Lqzhi/Qt-PyCalculator ## Basic Information - **Project Name**: Qt-PyCalculator - **Description**: A Python version of a simple calculator written while learning QT Python - **Primary Language**: Python - **License**: WTFPL - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2022-07-23 - **Last Updated**: 2025-01-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: Python, PyQt, Calculate ## README # Qt-PyCalculator #### 运行的图片 ![简单的计算器](Screenshots.png) #### 介绍 A Python version of a simple calculator written while learning QT Python. 学习QT Python时编写的简单计算器的Python版本。 #### 涉及内容: PyQt5 ui 转 python : forms包下的mainwindow.ui 通过pyqt5-tools包下的pyuic5将其转换为了 mainwindow.py 信号槽机制 : 基本上为点击事件 只需要拿到pushbutton的对象,然后.clicked.connect(lambda: self.方法),注意不能直接self.方法,要lambda才行。 QtPython资源管理: res包下放了静态文件,res.qrc,需要将这个文件与mainWindow.ui进行绑定起来,则在编辑器里面添加这个qrc,然后对其引用即可。 pyinstall 打包成exe: 执行一下命令 pyinstall -F -w --icon=res/favicon.ico main.py #### 还在学习的开源协议 ``` DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. 1. COMPLY WITH OTHER PUBLIC LICENSES. ```