diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml new file mode 100644 index 0000000000..93697f3307 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml @@ -0,0 +1,24 @@ +import QtQuick 1.0 + +Item { + property string result + + ListModel { + id: model + + ListElement { + val1: 1 + val2: 2 + val3: "str" + val4: false + val5: true + } + } + + Component.onCompleted: { + var element = model.get(0); + + for (var i in element) + result += i+"="+element[i]+(element[i] ? "Y" : "N")+":"; + } +} |