diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-06-09 14:57:18 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-06-11 19:28:01 +0000 |
commit | b255bf53c1eb12a83011af09a7c94be236dbc499 (patch) | |
tree | 96bf05bf803ed9737b63048db7f584fabeb242e8 /examples | |
parent | 3fc58a37f50cbae3d3e551dc6311771b561175cd (diff) |
bigmodel-qml: demonstrate dynamic model changes
Change-Id: I55732831bb6a08297939da4c2d4a002bb0e120b9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qt3d/bigmodel-qml/main.qml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/qt3d/bigmodel-qml/main.qml b/examples/qt3d/bigmodel-qml/main.qml index 9d6a16264..641ee860e 100644 --- a/examples/qt3d/bigmodel-qml/main.qml +++ b/examples/qt3d/bigmodel-qml/main.qml @@ -61,12 +61,12 @@ Entity { NodeInstantiator { id: collection - property int count: 64 + property int _count: 0 property real spacing: 5 property int cols: 8 property int _rows: count / cols - model: count + model: _count delegate: MyEntity { id: myEntity property real _lightness: 0.2 + 0.7 / collection._rows * Math.floor(index / collection.cols) @@ -77,4 +77,13 @@ Entity { diffuse: Qt.hsla( _hue, 0.5, _lightness, 1.0 ) } } + + QQ2.Timer { + interval: 1000 + repeat: true + running: true + onTriggered: { + collection._count += 1 + } + } } |