[Qt-qml] Unable to use external JS file with QML

Matthias Ettrich matthias.ettrich at nokia.com
Tue Apr 13 16:14:03 CEST 2010


On Tuesday 13 April 2010 12:56:29 ext Jack Wootton wrote:
> Hello,
> 
> It was recommended I post this question on
>  qt-qml at trolltech.com<mailto:qt-qml at trolltech.com> after first posting it
>  on Forum Nokia here:
>  http://discussion.forum.nokia.com/forum/showthread.php?p=724730
> 
> QML documentation states that JavaScript can be integrated with QML:
>  http://doc.qt.nokia.com/4.7-snapshot/qdeclarativejavascript.html
> 
> I've created a simple QML file (Test.qml) which imports an external
>  JavaScript file (a.js).
> 
[...]

> 
> The Application Ouput panel shows the error 'TypeError: Result of
>  expression 'Misc.doubleFloat' [undefined] is not a function'. The function
>  works fine if I inline it and remove the qualifier:
> 


Hi,

your code works just fine with today's Qt on Linux, i.e. you are not missing 
anything obvious.


 Matthias



More information about the Qt-qml mailing list