diff --git a/interface/resources/qml/windows/Frame.qml b/interface/resources/qml/windows/Frame.qml index 210a3c76d0..98bfb52c38 100644 --- a/interface/resources/qml/windows/Frame.qml +++ b/interface/resources/qml/windows/Frame.qml @@ -16,10 +16,11 @@ import "../js/Utils.js" as Utils Item { id: frame + objectName: "Frame" HifiConstants { id: hifi } default property var decoration - + property string qmlFile: "N/A" property bool gradientsSupported: desktop.gradientsSupported readonly property int frameMarginLeft: frame.decoration ? frame.decoration.frameMarginLeft : 0 @@ -44,7 +45,7 @@ Item { id: debugZ visible: DebugQML color: "red" - text: (window ? "Z: " + window.z : "") + text: (window ? "Z: " + window.z : "") + " " + qmlFile y: window ? window.height + 4 : 0 } diff --git a/libraries/qml/src/qml/OffscreenSurface.cpp b/libraries/qml/src/qml/OffscreenSurface.cpp index e3e26bb7fa..704111762a 100644 --- a/libraries/qml/src/qml/OffscreenSurface.cpp +++ b/libraries/qml/src/qml/OffscreenSurface.cpp @@ -342,6 +342,11 @@ void OffscreenSurface::finishQmlLoad(QQmlComponent* qmlComponent, // Make sure we make items focusable (critical for // supporting keyboard shortcuts) newItem->setFlag(QQuickItem::ItemIsFocusScope, true); +#ifdef DEBUG + for (auto frame : newObject->findChildren("Frame")) { + frame->setProperty("qmlFile", qmlComponent->url()); + } +#endif } bool rootCreated = getRootItem() != nullptr;