From 2747fd13ac6732780b299f997d969de8c597c9eb Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 26 Jun 2025 14:37:22 +0200 Subject: [PATCH 1/4] Change QGuiApplication to QApplication. Because we use QtCharts. --- examples/AdvancedPy/src/AdvancedPy/main.py | 4 ++-- examples/BasicPy/src/BasicPy/main.py | 4 ++-- examples/IntermediatePy/src/IntermediatePy/main.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/AdvancedPy/src/AdvancedPy/main.py b/examples/AdvancedPy/src/AdvancedPy/main.py index e6b7822..c8edd4f 100644 --- a/examples/AdvancedPy/src/AdvancedPy/main.py +++ b/examples/AdvancedPy/src/AdvancedPy/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 from PySide6.QtCore import qInstallMessageHandler @@ -31,7 +31,7 @@ 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}') engine = QQmlApplicationEngine() diff --git a/examples/BasicPy/src/BasicPy/main.py b/examples/BasicPy/src/BasicPy/main.py index dac3d02..eabba6f 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 e83b0ca..668b9ac 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() From 2a4c4516c52124b767ef0cc6ea2462d8cb169020 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 11 Sep 2025 16:12:58 +0200 Subject: [PATCH 2/4] Update FontAwesome to newest one for new icon needed for EasyImaging --- src/EasyApp/Gui/Style/Fonts.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EasyApp/Gui/Style/Fonts.qml b/src/EasyApp/Gui/Style/Fonts.qml index 03ca848..bbd8138 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 From 202842a978480feac2213e68770c0f28f6148083 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 11 Sep 2025 16:20:48 +0200 Subject: [PATCH 3/4] Change method name according to ADR --- src/EasyApp/Logic/Utils/Utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EasyApp/Logic/Utils/Utils.py b/src/EasyApp/Logic/Utils/Utils.py index b33f88f..8013d30 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 From 01d181eebb6317bb2c4196c3026c197ff0f66b09 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 16 Oct 2025 13:02:25 +0200 Subject: [PATCH 4/4] Update AdvancedPy template --- examples/AdvancedPy/src/AdvancedPy/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/AdvancedPy/src/AdvancedPy/main.py b/examples/AdvancedPy/src/AdvancedPy/main.py index c8edd4f..ef0ed46 100644 --- a/examples/AdvancedPy/src/AdvancedPy/main.py +++ b/examples/AdvancedPy/src/AdvancedPy/main.py @@ -8,6 +8,7 @@ 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 @@ -33,6 +34,7 @@ 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}')