效果预览


实现代码
from PyQt5.QtWidgets import QCheckBox, QApplication, QWidget, QVBoxLayout
from PyQt5.QtCore import Qt, QRect, QPropertyAnimation, QEasingCurve, pyqtProperty
from PyQt5.QtGui import QPainter, QColor, QPen, QFont
class CompactSwitchCheckbox(QCheckBox):
def __init__(self, parent=None):
super().__init__(parent)
# 调整控件的整体尺寸为 60x30
self.setFixedSize(60, 30)





![[数据集][目标检测]车窗状态检测车窗开关检测数据集VOC+YOLO格式299张3类别](https://i-blog.csdnimg.cn/direct/614e46e418304c09b7f0b77d47496086.png)













