(self, event)
| 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 | |
| 92 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected