demo4.qml 516 B

123456789101112131415161718192021222324252627282930313233
  1. import QtQuick 1.0
  2. /**
  3. * When more than one object is needed, give each object an unique objectName.
  4. */
  5. Rectangle {
  6. width: 300
  7. height: 300
  8. PersistentObject {
  9. objectName: "object1"
  10. property alias someText: inputField1.text
  11. }
  12. PersistentObject {
  13. objectName: "object2"
  14. property alias someText: inputField2.text
  15. }
  16. Column {
  17. TextInput {
  18. id: inputField1
  19. text: "Initial text object 1"
  20. }
  21. TextInput {
  22. id: inputField2
  23. text: "Initial text object 2"
  24. }
  25. }
  26. }