[Interest] (QQmlListProperty) Cannot assign to non-existent property "lon" lon: "3"

Mitch Curtis mitch.curtis at digia.com
Wed Nov 13 09:54:27 CET 2013


On 11/12/2013 02:00 PM, Anisha Kaul wrote:
> Greetings,
>
> I wish to see how [B]QQmlListProperty [/B] is used. I tried the
> following but I am not sure if this is the correct way to do it. I got
> an error shown as follows:
> "Cannot assign to non-existent property "lon" lon: "3"
>
[...]
> class DummyClass : public QObject
> {
>    private:
>      Q_OBJECT
>      Q_PROPERTY (bool functionWhat READ functionWhat WRITE functionSetWhat)
>    public:
>      DummyClass (QObject *parent = 0) {}
>
>      float lat; float lon;
>

lat and lon need to be declared with Q_PROPERTY, like functionWhat; with 
getters and setters defined.



More information about the Interest mailing list