ListModel.qml

Qt Code:
  1. import QtQuick 1.0
  2.  
  3. ListModel {
  4. ListElement {
  5. name: "Bill Smith"
  6. number: "555 3264"
  7. }
  8. ListElement {
  9. name: "John Brown"
  10. number: "555 8426"
  11. }
  12. ListElement {
  13. name: "Sam Wise"
  14. number: "555 0473"
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

main.qml

Qt Code:
  1. import QtQuick 1.0
  2.  
  3.  
  4. Rectangle {
  5. id: container
  6. width: 180
  7. height: 200
  8. color: "white"
  9.  
  10.  
  11.  
  12.  
  13. ListView {
  14. id: listModel
  15. anchors.fill: parent
  16. anchors.margins: 5
  17. model: ListModel {}
  18. delegate: Text {
  19. text: name + ": " + number
  20. }
  21. }
  22. }
To copy to clipboard, switch view to plain text mode 

White rectangle displayed (id: container)

What's wrong?