(1)qml中调用js文件:
import "script.js" as MyScript
(2)js中调用qml的库
.import QtQuick.LocalStorage 2.0 as Sql
(3)js中调用js文件
.import “script.js” as Script
或者
Qt.include("factorial2.js")
(1)qml中调用js文件:
import "script.js" as MyScript
(2)js中调用qml的库
.import QtQuick.LocalStorage 2.0 as Sql
(3)js中调用js文件
.import “script.js” as Script
或者
Qt.include("factorial2.js")