nimqml/examples/abstractitemmodel/main.qml

24 lines
438 B
QML
Raw Normal View History

2015-09-14 21:38:02 +00:00
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
2015-11-22 21:48:22 +00:00
ApplicationWindow {
2015-09-14 21:38:02 +00:00
width: 400
height: 300
title: "AbstractItemModel"
2016-04-05 21:28:19 +00:00
2015-09-14 21:38:02 +00:00
Component.onCompleted: visible = true
2015-11-22 21:48:22 +00:00
Component {
2015-09-14 21:38:02 +00:00
id: myListModelDelegate
Label { text: "Name:" + name }
}
2016-04-05 21:28:19 +00:00
2015-11-22 21:48:22 +00:00
ListView {
2015-09-14 21:38:02 +00:00
anchors.fill: parent
model: myListModel
delegate: myListModelDelegate
}
2015-11-22 21:48:22 +00:00
}