Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How do I print the "id" attribute of Item?

$
0
0
Printing the item using its id (rather than the id property of the item) works. If the objectName property is defined, that will also be output. For example: Item {     id: myItem     objectName: "my item"     Component.onCompleted: print(myItem) } should result in something along the lines of: qml: QQuickItem(0×101e12c60, “my item”) edit: The same applies for properties or variables assigned the value of the item using its id

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images