修复无信号时时钟不刷新的问题
This commit is contained in:
4
main.py
4
main.py
@@ -360,9 +360,9 @@ class MainWindow(QWidget):
|
||||
self._wifi_label.setStyleSheet("color: #e86c60; font-size: 18px; font-weight: 600;")
|
||||
|
||||
# --- 时钟(有网络时更新;断网后保留最后一次的时间) ---
|
||||
now = datetime.now()
|
||||
self._clock_label.setText(now.strftime("%H:%M:%S"))
|
||||
if is_connected:
|
||||
now = datetime.now()
|
||||
self._clock_label.setText(now.strftime("%H:%M:%S"))
|
||||
if not self._clock_has_synced:
|
||||
self._clock_has_synced = True
|
||||
self._clock_label.show()
|
||||
|
||||
Reference in New Issue
Block a user