<div dir="ltr">Maybe JSON.stringify(obj) is what you need?<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><br>Konstantin</div></div>
<br><div class="gmail_quote">2015-11-07 21:52 GMT+04:00 Luke Parry <span dir="ltr"><<a href="mailto:pumpkinteapot@gmail.com" target="_blank">pumpkinteapot@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Is it possible to override the toString method for native c++ QObject types for use in QML scripts?<br><br></div>e.g. using<br><br>Q_INVOKABLE QString toString() const;<br><br></div>This doesn't appear to work because it is overridden by some default implementation which returns a pointer value. Is this done intentionally? Could a workaround  be done through javascript prototype methods...<br><br>It would just improve the readability of debug messages and errors when running scripts.<br><br></div>Huge Thanks,<br></div>Luke Parry<br></div>
<br>_______________________________________________<br>
Development mailing list<br>
<a href="mailto:Development@qt-project.org">Development@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/development" rel="noreferrer" target="_blank">http://lists.qt-project.org/mailman/listinfo/development</a><br>
<br></blockquote></div><br></div></div>