ScriptItem.qml 821 B

12345678910111213141516171819202122232425262728
  1. import QtQuick
  2. import FluentUI
  3. import "../Global/"
  4. FluPaneItem{
  5. title: "home"
  6. icon:FluentIcons.Play36
  7. onTap:{
  8. // var component = Qt.createComponent("../../qml/Page/ScriptView.qml")
  9. // if (component.status === Component.Ready) {
  10. // var object = component.createObject(navigationView);
  11. // if (object !== null) {
  12. // object.configName = title
  13. // // 创建成功,可以进行操作
  14. // console.debug('创建成功')
  15. // navigationView.push(object)
  16. // }else{
  17. // // 创建失败
  18. // }
  19. // }else{
  20. // // 组件加载失败
  21. // }
  22. navigationView.pushScript(Qt.resolvedUrl("../../qml/Page/ScriptView.qml"), title)
  23. MainEvent.scriptName = title
  24. }
  25. }