1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-06 08:52:53 +01:00

feat(general_gui): added icon

This commit is contained in:
2024-06-26 20:40:05 +02:00
parent f7e46e5d8b
commit fb043f86d1
2 changed files with 7 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -3,6 +3,8 @@ import sys
import webbrowser
import qdarktheme
from qtpy.QtCore import QSize
from qtpy.QtGui import QIcon
from qtpy.QtWidgets import QApplication, QMainWindow
from bec_widgets.utils.ui_loader import UILoader
@@ -54,8 +56,13 @@ def main(): # pragma: no cover
"PYSIDE6 is not available in the environment. UI files with BEC custom widgets are runnable only with PySide6."
)
return
import bec_widgets
module_path = os.path.dirname(bec_widgets.__file__)
app = QApplication(sys.argv)
icon = QIcon()
icon.addFile(os.path.join(module_path, "assets", "BEC-Dark.png"), size=QSize(48, 48))
app.setWindowIcon(icon)
qdarktheme.setup_theme("dark")
main_window = BECGeneralApp()
main_window.show()