main.qml 751 B

123456789101112131415161718192021222324252627282930313233343536
  1. import QtQuick 2.7
  2. import QtQuick.Controls 1.4
  3. import QtQuick.Layouts 1.0
  4. import "main.js" as App
  5. ApplicationWindow {
  6. id: appWindow
  7. objectName: "appWindow"
  8. visible: true
  9. width: 800;
  10. height: 600;
  11. ColumnLayout {
  12. anchors.horizontalCenter: parent.horizontalCenter
  13. anchors.verticalCenter: parent.verticalCenter
  14. anchors.margins: 3
  15. spacing: 3
  16. Column {
  17. Text {
  18. id: mainText
  19. objectName: "mainText"
  20. text: "Hello from QML"
  21. }
  22. }
  23. Column {
  24. Text {
  25. id: jsText
  26. objectName: "jsText"
  27. }
  28. }
  29. }
  30. Component.onCompleted: {
  31. App.onLoad();
  32. }
  33. }