From 63c3979b77d80ccfa7ab1dc661c7530b4da9a6bb Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 6 Jan 2025 16:44:22 +0800 Subject: [PATCH] PyThermostat GUI: Set up icon Co-authored-by: Egor Savkin --- .../pythermostat/gui/resources/artiq.svg | 134 ++++++++++++++++++ pythermostat/pythermostat/thermostat_qt.py | 5 + 2 files changed, 139 insertions(+) create mode 100644 pythermostat/pythermostat/gui/resources/artiq.svg diff --git a/pythermostat/pythermostat/gui/resources/artiq.svg b/pythermostat/pythermostat/gui/resources/artiq.svg new file mode 100644 index 0000000..746d1c6 --- /dev/null +++ b/pythermostat/pythermostat/gui/resources/artiq.svg @@ -0,0 +1,134 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/pythermostat/pythermostat/thermostat_qt.py b/pythermostat/pythermostat/thermostat_qt.py index fa3b779..8dd9b86 100755 --- a/pythermostat/pythermostat/thermostat_qt.py +++ b/pythermostat/pythermostat/thermostat_qt.py @@ -225,6 +225,11 @@ async def coro_main(): app = QtWidgets.QApplication.instance() app.aboutToQuit.connect(app_quit_event.set) + app.setWindowIcon( + QtGui.QIcon( + str(importlib.resources.files("pythermostat.gui.resources").joinpath("artiq.svg")) + ) + ) main_window = MainWindow(args) main_window.show()