Hi,

I always get this error message whenever I run my app:
Qt Code:
  1. qrc:/Page1.qml:8 Invalid alias reference. Unable to find id "textField1"
To copy to clipboard, switch view to plain text mode 

What's wrong with my code?

NOTE: Please forgive me for silly question because I'm still a newbie in QML

Page1Form.ui.qml
Qt Code:
  1. import QtQuick 2.7
  2. import QtQuick.Controls 2.0
  3. import QtQuick.Layouts 1.3
  4.  
  5. Item {
  6. property alias textField1: textField1
  7. property alias button1: button1
  8.  
  9. RowLayout {
  10. anchors.horizontalCenter: parent.horizontalCenter
  11. anchors.topMargin: 20
  12. anchors.top: parent.top
  13.  
  14. TextField {
  15. id: textField1
  16. placeholderText: qsTr("Text Field")
  17. }
  18.  
  19. Button {
  20. id: button1
  21. text: qsTr("Press Me")
  22. }
  23. }
  24. }
To copy to clipboard, switch view to plain text mode 
Page1.qml
Qt Code:
  1. import QtQuick 2.7
  2. import Qt.labs.settings 1.0
  3.  
  4. Page1Form {
  5.  
  6. Settings {
  7. id: settings
  8. property alias settings_host: textField1.text
  9. }
  10.  
  11. button1.onClicked: {
  12. console.log("Button Pressed. Entered text: " + textField1.text);
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 
main.qml
Qt Code:
  1. import QtQuick 2.7
  2. import QtQuick.Controls 2.0
  3. import QtQuick.Layouts 1.3
  4.  
  5. ApplicationWindow {
  6. visible: true
  7. width: 640
  8. height: 480
  9. title: qsTr("Hello World")
  10.  
  11. SwipeView {
  12. id: swipeView
  13. anchors.fill: parent
  14. currentIndex: tabBar.currentIndex
  15.  
  16. Page1 {
  17. }
  18.  
  19. Page {
  20. Label {
  21. text: qsTr("Second page")
  22. anchors.centerIn: parent
  23. }
  24. }
  25. }
  26.  
  27. footer: TabBar {
  28. id: tabBar
  29. currentIndex: swipeView.currentIndex
  30. TabButton {
  31. text: qsTr("First")
  32. }
  33. TabButton {
  34. text: qsTr("Second")
  35. }
  36. }
  37. }
To copy to clipboard, switch view to plain text mode