Explorar el Código

SetQuitOnLastWindowClosed now False. Should prevent exit on Windows.

Thomas Buck hace 3 años
padre
commit
a08c5d1e24
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3
    2
      src/octotray.py

+ 3
- 2
src/octotray.py Ver fichero

@@ -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…
Cancelar
Guardar