I want to change dynamicaly type of qml Item without re-creation. In this example window transforms into popup window and question is how to transform it to qml Item.
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
Window {
id: myWindow
height: 300
width: 300
visible: true
MouseArea {
anchors.fill: parent
onDoubleClicked: myWindow.flags = Qt.Popup
}
}}
What are you trying to achieve?
You must understand that when you "transform" your Window into a popup Window, the actual type of your object does not change. You only set a flag, which happen to give your window a popup behavior. As to dynamically change the type of a QML object, I don't think it is even possible, and I don't see the point of it.