import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Window 2.15 import QtQml 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello Popup") id: window Column { y: 40 spacing: 10 Text { text: "Scenario A: Open the popup > Open Child => OK (Retranslate no longer an issue)" } Text { text: "Scenario B: Retranslate > Open the popup > Open Child => NOK (QML Popup: cannot find any window to open popup in.)" } } Row { anchors.centerIn: parent spacing: 10 Button { text: "Open the popup" onClicked: parentPopup.open() } Button { text: "Change Translator" onClicked: retranslator.retranslate() } } Popup { id: parentPopup modal: true parent: Overlay.overlay dim: true anchors.centerIn: parent background: Rectangle { color: "blue" } width: 250 height: 150 Row { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter anchors.margins: 10 spacing: 10 Button { text: "Close" onClicked: parentPopup.close() } Button { text: "Open Child" onClicked: childPopup.open() } } Popup { id: childPopup modal: true parent: Overlay.overlay dim: true anchors.centerIn: parent background: Rectangle { color: "teal" } width: 250 height: 150 Row { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter anchors.margins: 10 spacing: 10 Button { text: "Close" onClicked: childPopup.close() } } } } }