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:
BIN
bec_widgets/assets/BEC-Dark.png
Normal file
BIN
bec_widgets/assets/BEC-Dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user