aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/data/attachedProperties.qml
blob: f5fb173b895d3849cf5e17e447f616488570be7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.0

GridView {
  width: 100
  height: 100

  Component.onCompleted: currentIndex = 0

  model: ListModel {
    ListElement {
      name: "A"
    }
    ListElement {
      name: "B"
    }
  }

  delegate: Text {
    width: GridView.view.width
    text: model.name
  }

  header: Rectangle {
    width: GridView.view.width
  }

  footer: Rectangle {
    width: GridView.view.width
  }

  highlight: Rectangle {
    width: GridView.view.width
  }
}