Browse Source

SetQuitOnLastWindowClosed now False. Should prevent exit on Windows.

Thomas Buck 3 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,7 +18,7 @@ import urllib.parse
18 18
 import urllib.request
19 19
 from os import path
20 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 22
 from PyQt5.QtGui import QIcon, QPixmap, QImageReader, QDesktopServices, QFontDatabase, QCursor
23 23
 from PyQt5.QtCore import QCoreApplication, QSettings, QUrl, QTimer, QSize, Qt, QSettings
24 24
 
@@ -871,7 +871,8 @@ class OctoTray():
871 871
         self.trayIcon.setVisible(False)
872 872
 
873 873
 if __name__ == "__main__":
874
-    app = QtWidgets.QApplication(sys.argv)
874
+    app = QApplication(sys.argv)
875
+    app.setQuitOnLastWindowClosed(False)
875 876
 
876 877
     tray = OctoTray(app)
877 878
     rc = app.exec_()

Loading…
Cancel
Save