add image paths
This commit is contained in:
@ -5,6 +5,7 @@ import sys
|
||||
import datetime
|
||||
|
||||
import resources.resources_rc
|
||||
from utils.image_paths import ImagePaths
|
||||
|
||||
class DeviceStatusPopup(QDialog):
|
||||
def __init__(self, parent=None):
|
||||
@ -95,7 +96,7 @@ class DeviceStatusPopup(QDialog):
|
||||
|
||||
def update_connection_status(self, status: str):
|
||||
"""更新连接状态,切换显示图片"""
|
||||
img_path = ":/icons/images/在线.png" if status == "在线" else ":/icons/images/离线.png"
|
||||
img_path = ImagePaths.ONLINE if status == "在线" else ImagePaths.OFFLINE
|
||||
pixmap = QPixmap(img_path)
|
||||
self.status_img.setPixmap(pixmap.scaled(
|
||||
self.status_img.width(),
|
||||
|
||||
Reference in New Issue
Block a user