QML - Import external JavaScript file
问题 I can import JavaScript files which are already part of the project tree like this: import "myFile.js" as MyFile Is there any way to do this for external files that aren't already included in my project, i.e. by passing an absolute or relative path to the file on my disc? 回答1: For some questions that go like: Is it possible to do something like [this...] usually the easiest way, is to try it out. In your question a important detail is missing: Is the QML file in question in a qrc -file or not