1 2 3 4 5 6 7 8 9 10 11 12 13 14
pragma Strict import QtQuick Item { objectName: "a" function f(arg: Item) : string { // Read arg as QtObject and Item, merged into QtObject. console.log(arg) return arg.x } Component.onCompleted: objectName = f(null) }