On Fri, Jun 24, 2022, at 11:34, Ulf Hermann wrote:
> Indeed, in QQmlEngine the global object is frozen. You cannot replace
> its properties. Apparently you can still add to it, though. But see
> https://codereview.qt-project.org/c/qt/qtdeclarative/+/418536/1 for a
> possible solution.

Thanks a lot for this patch! Unfortunately I'm about to leave on holiday and 
will have no time to test it out before I leave. I hope you can find somebody 
else for review in the meantime.

> I would also like to know how you trigger the QQmlEngine warning signals
> and methods from pure JavaScript. Those methods could just as well be
> moved to QJSEngine if they make sense there. However, so far they're
> actually meant for QML warnings.

Right, normally when evaluating a script, any error can be caught and reported 
however you wish, but this does not work when the script execution is trigger 
through a signal connection. In this case, when using QJSEngine, errors are 
always printed to the standard out, whereas the QQmlEngine allows reporting 
these through its "warnings" signal.

Interest mailing list

Reply via email to