Creating components is now done with the prefab function

CURA-4568
This commit is contained in:
Jaime van Kessel 2017-11-27 13:00:49 +01:00
parent ffef26097d
commit 0613b1e4b7
5 changed files with 10 additions and 34 deletions

View file

@ -106,9 +106,5 @@ class ChangeLog(Extension, QObject,):
self._changelog_window.hide()
def createChangelogWindow(self):
path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "ChangeLog.qml"))
component = QQmlComponent(Application.getInstance()._engine, path)
self._changelog_context = QQmlContext(Application.getInstance()._engine.rootContext())
self._changelog_context.setContextProperty("manager", self)
self._changelog_window = component.create(self._changelog_context)
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "ChangeLog.qml")
self._changelog_window = Application.getInstance().createQmlComponent(path, {"manager": self})