mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 20:14:14 +02:00
[ui][panel] not terminating the application when the panel is closed
This commit is contained in:
@@ -76,7 +76,7 @@ def main():
|
|||||||
manager.prepare()
|
manager.prepare()
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
app.setQuitOnLastWindowClosed(False)
|
app.setQuitOnLastWindowClosed(False) # otherwise windows opened through the tray icon kill the aplication when closed
|
||||||
app.setApplicationName(__app_name__)
|
app.setApplicationName(__app_name__)
|
||||||
app.setApplicationVersion(__version__)
|
app.setApplicationVersion(__version__)
|
||||||
app_icon = util.get_default_icon()[1]
|
app_icon = util.get_default_icon()[1]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import time
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Type, Set
|
from typing import List, Type, Set
|
||||||
|
|
||||||
from PyQt5.QtCore import QEvent, Qt, QSize, pyqtSignal
|
from PyQt5.QtCore import QEvent, Qt, QSize, pyqtSignal, QCoreApplication
|
||||||
from PyQt5.QtGui import QIcon, QWindowStateChangeEvent
|
from PyQt5.QtGui import QIcon, QWindowStateChangeEvent
|
||||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderView, QToolBar, \
|
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderView, QToolBar, \
|
||||||
QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QPushButton, QComboBox, QApplication, QListView, QSizePolicy
|
QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QPushButton, QComboBox, QApplication, QListView, QSizePolicy
|
||||||
@@ -504,6 +504,8 @@ class ManageWindow(QWidget):
|
|||||||
event.ignore()
|
event.ignore()
|
||||||
self.hide()
|
self.hide()
|
||||||
self._handle_console_option(False)
|
self._handle_console_option(False)
|
||||||
|
else:
|
||||||
|
QCoreApplication.exit() # needed because QuitOnLastWindowClosed is disabled
|
||||||
|
|
||||||
def _handle_console(self, checked: bool):
|
def _handle_console(self, checked: bool):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user