aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/data/qtbug86255.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickgridview/data/qtbug86255.qml')
-rw-r--r--tests/auto/quick/qquickgridview/data/qtbug86255.qml55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickgridview/data/qtbug86255.qml b/tests/auto/quick/qquickgridview/data/qtbug86255.qml
new file mode 100644
index 0000000000..20688b1967
--- /dev/null
+++ b/tests/auto/quick/qquickgridview/data/qtbug86255.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.15
+
+Item {
+ width: 240
+ height: 320
+
+ GridView {
+ id: grid
+ objectName: "view"
+ anchors.fill: parent
+ cellWidth: 64
+ cellHeight: 64
+ model: ListModel {
+ id: listModel
+
+ Component.onCompleted: reload()
+
+ function reload() {
+ clear();
+ for (let i = 0; i < 1000; i++) {
+ let magic = Math.random();
+ append( { magic } );
+ }
+ }
+ }
+ clip: true
+ delegate: Item {
+ id: d
+ property string val: magic
+ Loader {
+ property alias value: d.val
+ asynchronous: true
+ sourceComponent: cmp
+ }
+ }
+ }
+
+ Timer {
+ running: true
+ interval: 1000
+ onTriggered: listModel.reload()
+ }
+ Timer {
+ running: true
+ interval: 500
+ onTriggered: grid.flick(0, -4000)
+ }
+
+ Component {
+ id: cmp
+ Text {
+ text: value
+ }
+ }
+}