diff --git a/examples/AdvancedPy/src/AdvancedPy/main.py b/examples/AdvancedPy/src/AdvancedPy/main.py index e6b78225..ef0ed46c 100644 --- a/examples/AdvancedPy/src/AdvancedPy/main.py +++ b/examples/AdvancedPy/src/AdvancedPy/main.py @@ -5,9 +5,10 @@ from pathlib import Path import sys -from PySide6.QtGui import QGuiApplication +from PySide6.QtWidgets import QApplication from PySide6.QtQml import QQmlApplicationEngine, qmlRegisterSingletonType from PySide6.QtCore import qInstallMessageHandler +from PySide6.QtGui import QIcon # It is usually assumed that the EasyApp package is already installed in the desired python environment. # If this is not the case, and if the example is run from the EasyApp repository, one need to add the path to the @@ -31,8 +32,9 @@ qmlRegisterSingletonType(Backend, 'Backends', 1, 0, 'PyBackend') console.debug('Backend class is registered as a singleton type for QML') - app = QGuiApplication(sys.argv) + app = QApplication(sys.argv) console.debug(f'Qt Application created {app}') + app.setWindowIcon(QIcon(str(CURRENT_DIR / 'Gui' / 'Resources' / 'Logos' / 'App.svg'))) engine = QQmlApplicationEngine() console.debug(f'QML application engine created {engine}') diff --git a/examples/BasicPy/src/BasicPy/main.py b/examples/BasicPy/src/BasicPy/main.py index dac3d02f..eabba6fa 100644 --- a/examples/BasicPy/src/BasicPy/main.py +++ b/examples/BasicPy/src/BasicPy/main.py @@ -5,7 +5,7 @@ from pathlib import Path import sys -from PySide6.QtGui import QGuiApplication +from PySide6.QtWidgets import QApplication from PySide6.QtQml import QQmlApplicationEngine # It is usually assumed that the EasyApp package is already installed in the desired python environment. @@ -18,7 +18,7 @@ if __name__ == '__main__': # Create Qt application - app = QGuiApplication(sys.argv) + app = QApplication(sys.argv) # Create the QML application engine engine = QQmlApplicationEngine() diff --git a/examples/IntermediatePy/src/IntermediatePy/main.py b/examples/IntermediatePy/src/IntermediatePy/main.py index e83b0ca1..668b9ac0 100644 --- a/examples/IntermediatePy/src/IntermediatePy/main.py +++ b/examples/IntermediatePy/src/IntermediatePy/main.py @@ -5,7 +5,7 @@ from pathlib import Path import sys -from PySide6.QtGui import QGuiApplication +from PySide6.QtWidgets import QApplication from PySide6.QtQml import QQmlApplicationEngine, qmlRegisterSingletonType # It is usually assumed that the EasyApp package is already installed in the desired python environment. @@ -26,7 +26,7 @@ qmlRegisterSingletonType(Backend, 'Backends', 1, 0, 'PyBackend') # Create Qt application - app = QGuiApplication(sys.argv) + app = QApplication(sys.argv) # Create the QML application engine engine = QQmlApplicationEngine() diff --git a/src/EasyApp/Gui/Style/Fonts.qml b/src/EasyApp/Gui/Style/Fonts.qml index 03ca8482..bbd8138c 100644 --- a/src/EasyApp/Gui/Style/Fonts.qml +++ b/src/EasyApp/Gui/Style/Fonts.qml @@ -23,7 +23,7 @@ QtObject { property FontLoader nunitoLight: FontLoader { source: fontPath("Nunito", "Nunito-Light.ttf") } // font.weight: Font.Light property FontLoader nunitoSemiBold: FontLoader { source: fontPath("Nunito", "Nunito-SemiBold.ttf") } // font.weight: Font.DemiBold - property FontLoader fontAwesomeSolid: FontLoader { source: fontPath("FontAwesome", "Font Awesome 5 Free-Solid-900.otf") } + property FontLoader fontAwesomeSolid: FontLoader { source: fontPath("FontAwesome", "Font Awesome 6 Free-Solid-900.otf") } // Font families readonly property string fontFamily: ptSansRegular.name diff --git a/src/EasyApp/Logic/Utils/Utils.py b/src/EasyApp/Logic/Utils/Utils.py index b33f88fd..8013d303 100644 --- a/src/EasyApp/Logic/Utils/Utils.py +++ b/src/EasyApp/Logic/Utils/Utils.py @@ -4,11 +4,11 @@ # Utils -def generalizePath(fpath: str) -> str: +def generalize_path(fpath: str) -> str: """ Generalize the filepath to be platform-specific, so all file operations can be performed. - :param URI rcfPath: URI to the file + :param URI fpath: URI to the file :return URI filename: platform specific URI """ filename = urlparse(fpath).path