[Qt-qml] Javascript imports

christian.eager at nokia.com christian.eager at nokia.com
Fri Feb 18 23:53:41 CET 2011


Hi Mario,

Have you looked at Qt.include() [1]? That method asynchronously imports the functions from a script into the calling script's namespace.

Chris

[1]: http://doc.qt.nokia.com/4.7-snapshot/qml-qt.html#include-method



On Feb 15, 2011, at 6:47 PM, ext Mario Negro Ponzi wrote:

> Hi,
> I have a QML project with multiple js files. I call js functions across the files. Due to the named imports in QML, it looks like I have to specify the name used in the QML file and that makes my js file dependent on the QML file that imports it (j the sense that it must know how the other file has been imported in QML).
> 
> Is there a way to avoid it?
> 
> Cheers,
> Mario
> 
> -- 
> 
> 
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml



More information about the Qt-qml mailing list