mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-30 10:47:34 +02:00
[ui] app: Register components to QML before instantiating the engine
This commit is contained in:
parent
6355037036
commit
96a9757f5c
1 changed files with 3 additions and 1 deletions
|
@ -250,6 +250,9 @@ class MeshroomApp(QApplication):
|
||||||
# be retrievable
|
# be retrievable
|
||||||
self._updatedRecentProjectFilesThumbnails = True
|
self._updatedRecentProjectFilesThumbnails = True
|
||||||
|
|
||||||
|
# Register components for QML before instantiating the engine
|
||||||
|
components.registerTypes()
|
||||||
|
|
||||||
# QML engine setup
|
# QML engine setup
|
||||||
qmlDir = os.path.join(pwd, "qml")
|
qmlDir = os.path.join(pwd, "qml")
|
||||||
url = os.path.join(qmlDir, "main.qml")
|
url = os.path.join(qmlDir, "main.qml")
|
||||||
|
@ -263,7 +266,6 @@ class MeshroomApp(QApplication):
|
||||||
qInstallMessageHandler(MessageHandler.handler)
|
qInstallMessageHandler(MessageHandler.handler)
|
||||||
|
|
||||||
self.engine.addImportPath(qmlDir)
|
self.engine.addImportPath(qmlDir)
|
||||||
components.registerTypes()
|
|
||||||
|
|
||||||
# expose available node types that can be instantiated
|
# expose available node types that can be instantiated
|
||||||
self.engine.rootContext().setContextProperty("_nodeTypes", {n: {"category": nodesDesc[n].category} for n in sorted(nodesDesc.keys())})
|
self.engine.rootContext().setContextProperty("_nodeTypes", {n: {"category": nodesDesc[n].category} for n in sorted(nodesDesc.keys())})
|
||||||
|
|
Loading…
Add table
Reference in a new issue