[Development] Override toString() method for c++ QObject types in QML
pumpkinteapot at gmail.com
Tue Nov 10 12:12:08 CET 2015
That's fine. I was curious if this was possible or not in the current state
I do not yet have critical need for it but it could also be useful for
overriding the valueOf prototype. I will just use another method to provide
debug information about a QObject type.
Thanks for the quick answer,
On 9 November 2015 at 09:10, Knoll Lars <Lars.Knoll at theqtcompany.com> wrote:
> On 08/11/15 22:57, "Development on behalf of Stephen Kelly" <
> development-bounces at qt-project.org on behalf of steveire at gmail.com> wrote:
> >Konstantin Ritt wrote:
> >> Maybe JSON.stringify(obj) is what you need?
> >I think the intention is to override what that does using a specified
> JSON.stringify() does something slightly different than what you can do by
> reimplementing toString().
> For toString(), the default implementation for the object prototype will
> currently get used. Implementing an invokable method on the wrapped QObject
> would be nice, but currently there is some logic in the engine missing that
> would allow that method to get picked up automatically.
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development