import sys
from PyQt5.QtWidgets import QMainWindow, QWidget, QLabel, QLineEdit, QApplication
from PyQt5.QtCore import Qt
# 数字与点位的对应
digits = {1: (3, 7), 2: (2, 3, 4, 5, 6), 3: (2, 3, 4, 6, 7), 4: (1, 3, 4, 7), 5: (1, 2, 4, 6, 7), 6: (1, 2, 4, 5, 6, 7),
7: (2, 3, 7), 8: (1, 2, 3, 4, 5, 6, 7), 9: (1, 2, 3, 4, 6, 7), 0: (1, 2, 3, 5, 6, 7)}
# 数字点位的类,含有on和off功能
class light(QLabel):
def __init__(self, form):
super().__init__(form)
self.setUI()
de
python + PyQT5 制作了数位数字显示
最新推荐文章于 2023-01-13 18:07:26 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)