demo1.qml 322 B

123456789101112131415161718192021
  1. import QtQuick 1.0
  2. /**
  3. * Simple demonstration on how to use PersistentObject
  4. */
  5. Rectangle {
  6. width: 300
  7. height: 300
  8. PersistentObject {
  9. id: simpleObject
  10. property string someText: "initial text"
  11. }
  12. TextInput {
  13. text: simpleObject.someText
  14. onTextChanged: simpleObject.someText = text
  15. }
  16. }