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

@ -45,9 +45,5 @@ class UserAgreement(QObject, Extension):
CuraApplication.getInstance().setNeedToShowUserAgreement(False)
def createUserAgreementWindow(self):
path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "UserAgreement.qml"))
component = QQmlComponent(Application.getInstance()._engine, path)
self._user_agreement_context = QQmlContext(Application.getInstance()._engine.rootContext())
self._user_agreement_context.setContextProperty("manager", self)
self._user_agreement_window = component.create(self._user_agreement_context)
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "UserAgreement.qml")
self._user_agreement_window = Application.getInstance().createQmlComponent(path, {"manager": self})