Inspired by this Answer QML - Import external JavaScript file I am trying to load a .js
file from a external URL.
import QtQuick 2.9
import QtQuick.Window 2.2
import 'http://code.qt.io/cgit/qt/qtdeclarative.git/plain/examples/quick/demos/photoviewer/PhotoViewerCore/script/script.js' as Test
Window {
id: window
visible: true
width: 600
height: 600
Component.onCompleted: console.log('It is:', Test.calculateScale(100, 100, 200) + '!\nMagical!')
}
But with the import 'http://...' statement my application is not even starting / crashes immediately after start (without any error message).
I have the strong feeling that I am missing something to get the external import working, but I have no idea what exactly.