tests/auto/qml/qqmllistmodel/data/qtbug38907.qml
raw| 1 | import QtQuick 2.0 |
| 2 | import QtTest 1.0 |
| 3 | |
| 4 | Item { |
| 5 | |
| 6 | Item { |
| 7 | id : testItem |
| 8 | property string name : "testObject" |
| 9 | property var object : this |
| 10 | function testMethod() { |
| 11 | return -1; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | ListModel { |
| 16 | id : listModel |
| 17 | dynamicRoles : true |
| 18 | } |
| 19 | |
| 20 | function exec() { |
| 21 | listModel.append(testItem); |
| 22 | listModel.append({ item : testItem }); |
| 23 | return true; |
| 24 | } |
| 25 | } |