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

Jérôme Godbout jerome at bodycad.com
Fri Oct 28 15:28:47 CEST 2016


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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161028/c086a58f/attachment.html>

More information about the Interest mailing list