Created
December 5, 2018 04:02
-
-
Save anaynayak/419d817bb24f8b707f3cba1b5c91d384 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import QSystemTrayIcon, QApplication | |
from PyQt5.QtGui import QIcon | |
class BuildNotifyTest: | |
def __init__(self, app): | |
self.app = app | |
self.tray = QSystemTrayIcon(QIcon.fromTheme("edit-undo"), self.app) | |
self.tray.activated.connect(QApplication.instance().quit) | |
self.tray.show() | |
if __name__ == '__main__': | |
app = QApplication(sys.argv) | |
app.setQuitOnLastWindowClosed(False) | |
buildnotify = BuildNotifyTest(app) | |
sys.exit(buildnotify.app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment