Changeset View
Changeset View
Standalone View
Standalone View
tests/qml/columnheaders.qml
- This file was added.
1 | import QtQuick 2.0 | ||||
---|---|---|---|---|---|
2 | import org.kde.kitemmodels 1.0 | ||||
3 | | ||||
4 | // This test is somewhat lame in that it should only display a single "1". | ||||
5 | // ListModel only has one column and no way of adding more. And there is not | ||||
6 | // really another model that is simple to create from QML that does have columns | ||||
7 | // and column headers. | ||||
8 | | ||||
9 | ListView { | ||||
10 | model: KColumnHeadersProxyModel { | ||||
11 | sourceModel: ListModel { | ||||
12 | ListElement { display: "test1" } | ||||
13 | ListElement { display: "test2" } | ||||
14 | } | ||||
15 | } | ||||
16 | | ||||
17 | delegate: Text { | ||||
18 | text: model.display | ||||
19 | } | ||||
20 | } | ||||
21 | |