Best practice: Integrate .js file to a project
QML and Qt Quick
5
Posts
3
Posters
1.9k
Views
1
Watching
-
Hi,
the question is, how to properly add a .js file to my project.
Currently, I have created a qrc file and add the .js file to it.
Now, I can reference to it with an import statement like this:
@import "qrc:/helper.js" as Helper@
This works, but the Qt Creator has marked this as an error with a red underline.If I use loose .js files and reference with
@import "helper.js" as Helper@this has to be deployed as a loose file, too. So, anyone can simply manipulate it.
So, what is the best way? Perhaps there are much more ways...