aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml')
-rw-r--r--tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml b/tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml
new file mode 100644
index 0000000000..a1d00bfbdf
--- /dev/null
+++ b/tests/auto/quick/qquickgridview/data/removeAccessibleChildrenEvenIfReusingItems.qml
@@ -0,0 +1,48 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick 2.15
+
+Rectangle {
+ id: page
+ width: 640
+ height: 480
+
+ Accessible.role : Accessible.Client
+
+ GridView {
+ id: grid
+
+ width: 640
+ height: 480
+ model: listModel
+
+ cellWidth: 180
+ cellHeight: 30
+
+ delegate: Text {
+ id: textDelegate
+ text: name
+ Accessible.role: Accessible.Button
+ Accessible.name: name
+ }
+ reuseItems: true
+ Accessible.role : Accessible.Client
+ }
+
+ ListModel {
+ id: listModel
+ ListElement { name: "item11"}
+ ListElement { name: "item12"}
+ ListElement { name: "item13"}
+ ListElement { name: "item14"}
+ }
+
+ function replaceItems() {
+ listModel.clear()
+ listModel.insert(0, {"name" : "item21"})
+ listModel.insert(1, {"name" : "item22"})
+ listModel.insert(2, {"name" : "item23"})
+ listModel.insert(3, {"name" : "item24"})
+ }
+}