[Interest] Qml Javascript pragma libray use Qt.matrix4x4() possible?

Cavit Sina Dogru sinadooru at gmail.com
Wed Nov 2 17:46:03 CET 2016


Hey Jerome,

Seems like my JS environment recognize the Qt global object by default,
without importing any. Even on stateless js library file (.pragma library).

I am using Qt 5.7 here. Are you sure if you can not access the Qt global
object just because you are on stateless js library file?

Cheers,
Sina

On Fri, Oct 28, 2016 at 4:28 PM, Jérôme Godbout <jerome at bodycad.com> wrote:

> Hi,
>
> I have a javascript script that doesn't have any hard requirement and
> widely used  inside our code, therefor I would like it to be .pragma
> library to avoid multiple instance. I have a function that need to create a
> Qt.matrix4x4() and return the value, but since it's a pragma library script
> I cannot access the Qt singleton/object.
>
> Is there any way to import it into the pragma or I have to make that
> function non pragma library as soon as I want to return a Qt basic type
> (matrix4x4, vector3d...)?
>
> Clearly Qt.include() cannot be used, but maybe import but I don't know
> what the resource url/version could be?
>
> .import TypeNamespace MajorVersion.MinorVersion as Qualifier
>
> or something similar? or is that also prevented into pragma library?
>
> Thanks,
> Jerome
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161102/3de10349/attachment.html>


More information about the Interest mailing list