blob: 83ac1b80a8b0123841fec54ca19535034c9fe3d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
function testModelRoleDataProvider(index, role, cellData) {
switch (role) {
case "display":
switch (index.column) {
case 0:
return cellData.name
case 1:
return cellData.age
}
break
case "name":
return cellData.name
case "age":
return cellData.age
}
return cellData
}
|