I want to implement a QML type in C++. Said QML type is supposed to be loaded from a Component
or similar, like so:
Component {
id: jesseMaker
JesseType {
id: doge
something: "wow"
oops: 67
yes: "hurray"
}
}
Notice how there's nothing unusual about this initialization. However, I also want the following JavaScript to be invalid at the denoted points:
function somewhereElse() {
var thing = jesseMaker.createObject(this, {"something": "yay"}); // OK
thing.oops = 12; // Should be an ERROR, as if this Q_PROPERTY had no WRITE
}
To achieve my stated goals, how can I define the relevant properties?