From 96a9757f5c129d07dec23ba47efc0e33b47a016b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 18 Feb 2025 18:15:19 +0100 Subject: [PATCH] [ui] app: Register components to QML before instantiating the engine --- meshroom/ui/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 40ba878e..2bf13329 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -250,6 +250,9 @@ class MeshroomApp(QApplication): # be retrievable self._updatedRecentProjectFilesThumbnails = True + # Register components for QML before instantiating the engine + components.registerTypes() + # QML engine setup qmlDir = os.path.join(pwd, "qml") url = os.path.join(qmlDir, "main.qml") @@ -263,7 +266,6 @@ class MeshroomApp(QApplication): qInstallMessageHandler(MessageHandler.handler) self.engine.addImportPath(qmlDir) - components.registerTypes() # expose available node types that can be instantiated self.engine.rootContext().setContextProperty("_nodeTypes", {n: {"category": nodesDesc[n].category} for n in sorted(nodesDesc.keys())})