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