import QtQml import "script.js" as JS QtObject { Component.onCompleted: JS.f() }