QT 5.2 - Including / Importing a JavaScript Resource from Another JavaScript Resource is broken since 5.2
-
In my qml project I use a.js, b.js and z.js. a.js and b.js use functions of z.js. So I included z.js with the following code in a.js and b.js:
@Qt.include("z.js")@
This worked perfectly with QT 5.1, but since I switched to 5.2 it doesnt work anymore. I get the following error:
@a.js: TypeError: Property 'myExternalFunction' of object [object Object] is not a function@
I looked at the "Docs":http://qt-project.org/doc/qt-5/qtqml-javascript-imports.html and tried the alternative ".import" code, but this gives me a "Syntax error" in my a.js and b.js.
Is there any way to fix this? Or is this a new introduced bug that cant be fixed by myself?
-
Is there no solution to this problem?
Or does this problem only occur in my project? :)
-
Weekly push of the day :)
-
Hi,
Did you check the "bug report system":http://bugreports.qt-project.org to see whether it's something known ? If now you could open a report with a minimal compilable example that reproduce the behavior
-
Couldnt find a related issue, so I opened a new bug report with a small example:
-
I updated the bugreport. Seems to work fine with windows, but error occurs on linux machines. Anyone on linux not having the described problem?
-
Just an update:
Problem is fixed with Qt 5.3. Unfortunately the update also breaks other parts of my application, but just wanted to update you guys :) -
Can you tell us what breaks now on Qt 5.3? I'm curious
-
See this post:
http://qt-project.org/forums/viewthread/42799/
Maybe there is more, but I stopped using 5.3 frustrated ^^