blob: 38e7fbb20071381d5d15d594efb684caf87a9335 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from __future__ import annotations
import sys
from PySide6.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon
from window import Window
if __name__ == "__main__":
app = QApplication()
if not QSystemTrayIcon.isSystemTrayAvailable():
QMessageBox.critical(None, "Systray", "I couldn't detect any system tray on this system.")
sys.exit(1)
QApplication.setQuitOnLastWindowClosed(False)
window = Window()
window.show()
sys.exit(app.exec())
|