Guest User

Untitled

a guest
May 26th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import QtQuick 2.9
  2. import QtQuick.Controls 2.1
  3. import QtQuick.Window 2.2
  4.  
  5. Window {
  6. id: window
  7. visible: true
  8. width: 640
  9. height: 480
  10. title: qsTr("Hello World")
  11. ListView {
  12. id: view
  13. height: 48
  14. delegate: TextField {
  15. text: modelData
  16. }
  17. model: ListModel {
  18. id: model
  19. ListElement {
  20. modelData: "test"
  21. }
  22. }
  23. }
  24. Button {
  25. anchors.top: view.bottom
  26. onClicked: {
  27. window.title = model.get(0).modelData;
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment