Hello,

I'm getting "non-valid" parent in my object.

I have the following code:

ApplicationWindow {
   id: appWindow
   MyItem {}
}

MyItem's code:

Item {
      id: root
     Component.onCompleted: {
        console.log("appWindow:", appWindow);
        console.log("parent: ", root.parent);
     }
}

I'm getting the following output:

qml: appWindow: QQuickApplicationWindow_QML_278(0x17db695b330)
qml: parent:  QQuickContentItem(0x17db68b3ef0, "ApplicationWindow")

What does it mean? Why parent is NOT appWindow? Isn't it should be?

Is it a bug? Am I missing something?

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to