소스 검색

SetQuitOnLastWindowClosed now False. Should prevent exit on Windows.

Thomas Buck 3 년 전
부모
커밋
a08c5d1e24
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    2
      src/octotray.py

+ 3
- 2
src/octotray.py 파일 보기

@@ -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…
취소
저장