tablet cpp ownership

This commit is contained in:
Dante Ruiz 2017-04-21 18:26:26 +01:00
parent cbd2a532a8
commit 8cfa03fa56

View file

@ -96,6 +96,9 @@ void OffscreenUi::create(QOpenGLContext* context) {
rootContext->setContextProperty("OffscreenUi", this);
rootContext->setContextProperty("offscreenFlags", offscreenFlags = new OffscreenFlags());
rootContext->setContextProperty("fileDialogHelper", new FileDialogHelper());
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
TabletProxy* tablet = tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system");
rootContext->engine()->setObjectOwnership(tablet, QQmlEngine::CppOwnership);
}
void OffscreenUi::show(const QUrl& url, const QString& name, std::function<void(QQmlContext*, QObject*)> f) {