Hi,
I am looking into migrating my code to QJSEngine, because of the deprecation of
the QScriptEngine (QtScript). As we have used the functionality of newFunction
very extensive and all related scripts are depending on this, the newFunction
in QJSEngine is for us mandatory or something that
project.org
Subject: Re: [Interest] QJSEngine replacement for QScriptEngine misses
newFunction
Hi Stefan,
On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote:
[...]
>
> And in this way. I can use it then in the script:
> value = sqrt(4);
>
> I actually don't want to map a whole QO
As a workaround you can use QQmlContext::setContextObject:
QQmlEngine::rootContext()->setContextObject(myMath);
On Tue, Feb 23, 2016 at 2:11 PM, Stephen Bryant wrote:
> Hi Stefan,
>
> On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote:
> [...]
>>
>> And in this way. I can
Hi Stefan,
On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote:
[...]
>
> And in this way. I can use it then in the script:
> value = sqrt(4);
>
> I actually don't want to map a whole QObject, because that would require a
> call like this: value = MyMath.sqrt(4);
>
> Is there any way to
Hi,
I am looking into migrating my code to QJSEngine, because of the deprecation of
the QScriptEngine (QtScript). As we have used the functionality of newFunction
very extensive and all related scripts are depending on this, the newFunction
in QJSEngine is for us mandatory or something that