Re: [Development] Override toString() method for c++ QObject types in QML

2015-11-07 Thread Konstantin Ritt
Maybe JSON.stringify(obj) is what you need? Konstantin 2015-11-07 21:52 GMT+04:00 Luke Parry : > Is it possible to override the toString method for native c++ QObject > types for use in QML scripts? > > e.g. using > > Q_INVOKABLE QString toString() const; > > This doesn't appear to work because

[Development] Override toString() method for c++ QObject types in QML

2015-11-07 Thread Luke Parry
Is it possible to override the toString method for native c++ QObject types for use in QML scripts? e.g. using Q_INVOKABLE QString toString() const; This doesn't appear to work because it is overridden by some default implementation which returns a pointer value. Is this done intentionally? Coul