Cannot assign to non-existent property - QtObject
Code:
import QtQuick 2.0
Item
{
id : mainWindow
width : 1024
height : 768
QtObject
{
id: anisha
property url theme;
}
anisha.theme: "ddsad";
}
Error:
Code:
Cannot assign to non-existent property "anisha"
anisha.theme: "ddsad";
What is the way to use QtObject?
Re: Cannot assign to non-existent property - QtObject
Okay, the problem was that I hadn't placed statement `anisha.theme` inside any QML object.
So, when I do:
Text { text: anisha.theme } , it works as expected.
Re: Cannot assign to non-existent property - QtObject
Did you remove the line -
Code:
anisha.theme: "ddsad";
??
You are trying to use the initialization format while assigning value to the property.
This should work -
Code:
anisha.theme = "ddsad";
Re: Cannot assign to non-existent property - QtObject
I did realize that lately. Yes, that was also a problem. Thanks.