Error: Cannot assign [undefined] to QString
I got this error whenever I tried assign something by object and not by object's id.
I.e. I have
Code:
MyComponent{ id: mySomething //with many non visible properties}
and I tried to use it like in this:
Code:
Text{id: sometext; text: "I want to see my class property of QString type. Here it is: " + MyComponent.string_property}
It generates an error and property is undefined.
It should be done so:
Code:
MyComponent{ id: mySomething} //first initialize instance of class :)
Text{ id: sometext
text: mySomething.string_property
...
}
Does it helps?
Regards, Andrzej