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

Method closeEvent

QSystemTrayIcon/MinimizeToTray.py:80–89  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

78 # Override closeEvent, to intercept the window closing event
79 # The window will be closed only if there is no check mark in the check box
80 def closeEvent(self, event):
81 if self.check_box.isChecked():
82 event.ignore()
83 self.hide()
84 self.tray_icon.showMessage(
85 "Tray Program",
86 "Application was minimized to Tray",
87 QSystemTrayIcon.Information,
88 2000
89 )
90
91
92if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

showMessageMethod · 0.80

Tested by

no test coverage detected