From 00bba828ee12471249307bfdf7e5642358510918 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Fri, 7 Jun 2019 16:41:56 -0700 Subject: [PATCH] Fix crash using Settings in the Tablet in VR This was introduced in Qt5.12.3. There are several issues in their bug tracker about this issue. https://bugreports.qt.io/browse/QTBUG-75516 https://bugreports.qt.io/browse/QTBUG-75335 To workaround this, we call Qt.createComponent() manually, instead of letting StackView do it for us. --- interface/resources/qml/hifi/tablet/TabletMenuStack.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/tablet/TabletMenuStack.qml b/interface/resources/qml/hifi/tablet/TabletMenuStack.qml index fe636dafa5..76d170cba8 100644 --- a/interface/resources/qml/hifi/tablet/TabletMenuStack.qml +++ b/interface/resources/qml/hifi/tablet/TabletMenuStack.qml @@ -49,7 +49,10 @@ Item { } function pushSource(path) { - d.push(Qt.resolvedUrl("../../" + path)); + // Workaround issue https://bugreports.qt.io/browse/QTBUG-75516 in Qt 5.12.3 + // by creating the manually, instead of letting StackView do it for us. + var item = Qt.createComponent(Qt.resolvedUrl("../../" + path)); + d.push(item); if (d.currentItem.sendToScript !== undefined) { d.currentItem.sendToScript.connect(tabletMenu.sendToScript); }