I've managed to reproduce the crash in the following code. The version of Qt i'm using is 4.7.4. Can anyone tell me why this would crash the program? Does it crash for anyone else?

Qt Code:
  1. import QtQuick 1.0
  2.  
  3. Rectangle {
  4. id: main
  5. width: 360
  6. height: 360
  7.  
  8. Text {
  9. id: addBtn
  10. text: "Add to List"
  11. anchors.top: parent.top
  12. width: parent.width
  13. height: 40
  14. horizontalAlignment: Text.AlignHCenter
  15. verticalAlignment: Text.AlignVCenter
  16. font.bold: true
  17.  
  18. MouseArea {
  19. anchors.fill: parent
  20. onClicked: {
  21. list_model.append({"display": "Click me to delete me"})
  22. }
  23. }
  24. }
  25.  
  26. ListView {
  27. anchors.top: parent.top
  28. anchors.topMargin: 40
  29. anchors.left: parent.left
  30. anchors.right: parent.right
  31. anchors.bottom: parent.bottom
  32. spacing: 5
  33.  
  34. model: ListModel {
  35. id: list_model
  36. }
  37.  
  38. delegate: Rectangle
  39. {
  40. border.width: 1
  41. border.color: "#000"
  42. width: main.width - 1
  43. height: delText.height + 8
  44.  
  45. MouseArea {
  46. anchors.fill: parent
  47. onClicked: {
  48. list_model.remove(index)
  49. }
  50. }
  51.  
  52. Text {
  53. id: delText
  54. height: 20
  55. anchors.horizontalCenter: parent.horizontalCenter
  56. anchors.verticalCenter: parent.verticalCenter
  57. text: display
  58. }
  59. }
  60. }
  61. }
To copy to clipboard, switch view to plain text mode