Browse Source

SetQuitOnLastWindowClosed now False. Should prevent exit on Windows.

Thomas Buck 2 years ago
parent
commit
a08c5d1e24
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/octotray.py

+ 3
- 2
src/octotray.py View File

18
 import urllib.request
18
 import urllib.request
19
 from os import path
19
 from os import path
20
 from PyQt5 import QtWidgets, QtGui, QtCore, QtNetwork
20
 from PyQt5 import QtWidgets, QtGui, QtCore, QtNetwork
21
-from PyQt5.QtWidgets import QSystemTrayIcon, QAction, QMenu, QMessageBox, QWidget, QLabel, QVBoxLayout, QHBoxLayout, QDesktopWidget, QSizePolicy, QSlider, QLayout, QTableWidget, QTableWidgetItem, QPushButton
21
+from PyQt5.QtWidgets import QSystemTrayIcon, QAction, QMenu, QMessageBox, QWidget, QLabel, QVBoxLayout, QHBoxLayout, QDesktopWidget, QSizePolicy, QSlider, QLayout, QTableWidget, QTableWidgetItem, QPushButton, QApplication
22
 from PyQt5.QtGui import QIcon, QPixmap, QImageReader, QDesktopServices, QFontDatabase, QCursor
22
 from PyQt5.QtGui import QIcon, QPixmap, QImageReader, QDesktopServices, QFontDatabase, QCursor
23
 from PyQt5.QtCore import QCoreApplication, QSettings, QUrl, QTimer, QSize, Qt, QSettings
23
 from PyQt5.QtCore import QCoreApplication, QSettings, QUrl, QTimer, QSize, Qt, QSettings
24
 
24
 
871
         self.trayIcon.setVisible(False)
871
         self.trayIcon.setVisible(False)
872
 
872
 
873
 if __name__ == "__main__":
873
 if __name__ == "__main__":
874
-    app = QtWidgets.QApplication(sys.argv)
874
+    app = QApplication(sys.argv)
875
+    app.setQuitOnLastWindowClosed(False)
875
 
876
 
876
     tray = OctoTray(app)
877
     tray = OctoTray(app)
877
     rc = app.exec_()
878
     rc = app.exec_()

Loading…
Cancel
Save