MCPcopy Create free account
hub / github.com/PyQt5/PyQt / flash_icon

Method flash_icon

QSystemTrayIcon/TrayNotify.py:55–63  ·  view source on GitHub ↗

根据当前图标是否可见切换图标

(self)

Source from the content-addressed store, hash-verified

53 QStyle.SP_ComputerIcon))
54
55 def flash_icon(self):
56 """根据当前图标是否可见切换图标"""
57 if self.tray_visible:
58 self.tray_icon.setIcon(self.style().standardIcon(
59 QStyle.SP_TrashIcon))
60 else:
61 self.tray_icon.setIcon(self.style().standardIcon(
62 QStyle.SP_ComputerIcon))
63 self.tray_visible = not self.tray_visible
64
65
66if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

setIconMethod · 0.80

Tested by

no test coverage detected