fixbug开始黑屏

This commit is contained in:
scout 2024-12-04 13:06:20 +08:00
parent 36c4f6153c
commit 0458195df7

View File

@ -295,6 +295,13 @@ try:
def toggle_monitoring(self):
if not self.running:
# 开始监控时重置所有计时相关变量
self.last_face_time = time.time()
self.no_face_duration = 0
self.progress_bar.setValue(0)
self.progress_bar.setFormat("离开时间: 0s")
self.set_progress_bar_style("#4CAF50")
self.running = True
self.start_stop_btn.setText("停止监控")
self.start_stop_btn.setStyleSheet("background-color: #ff4444;")