2023-08-24 14:02:00 +00:00
|
|
|
pragma Strict
|
|
|
|
import QtQml
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
property Component shadowable: QtObject {}
|
|
|
|
property B b: B { id: theB }
|
|
|
|
property rect r: theB.r
|
|
|
|
|
|
|
|
property Component c: Component {
|
|
|
|
id: unshadowable
|
|
|
|
QtObject {}
|
|
|
|
}
|
|
|
|
|
2024-01-31 14:17:19 +00:00
|
|
|
// We need this extra function in order to coerce the result of the shadowable
|
|
|
|
// method call back to QtObject
|
|
|
|
function createShadowable() : QtObject {
|
|
|
|
return shadowable.createObject(this, {objectName: "a"})
|
|
|
|
}
|
|
|
|
|
2023-08-24 14:02:00 +00:00
|
|
|
objectName: {
|
2024-01-31 14:17:19 +00:00
|
|
|
return createShadowable().objectName
|
2023-08-24 14:02:00 +00:00
|
|
|
+ " " + unshadowable.createObject(this, {objectName: "b"}).objectName
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: b.r = { x: 12, y: 13, width: 14, height: 15 }
|
|
|
|
}
|