Transform property id
-
Hi,
is it possible to transform the id of an qml element to a string?
I tried it with valueOf but then the log give the error: ReferenceError: Can't find variable: id
Is there a possiblity to access the id value?example:
@
Rectangle {
id: rect99
objectName: valueOf(id)
@ -
Hi,
id is a special "attribute":http://doc.qt.io/qt-5/qtqml-syntax-objectattributes.html (it is not a property). It acts as a reference to the object only; you cannot "read" the value of an id, unfortunately.
-
the id works a lot like a named pointer, but without having the this keyword available.
-
Ok, i hoped that there is a special trick or something to access the value.
Thanks you both