QmlApplication のメイン QML ウィンドウの子ウィンドウとして、まったく新しいウィンドウ インスタンスを作成する方法はありますか?
// ChildWindow.qml
Rectangle {
id: childWindow
width: 100
height: 100
// stuff
}
// main.qml
Rectangle {
id: window
width: 1000
height: 600
MouseArea {
anchors.fill: parent
onClicked: createAWindow(childWindow);
}
}
Q_OBJECT
new 内で新しいウィンドウをインスタンス化するためだけにクラスを作成しないようにしていますQmlApplicationViewer
。