2026-03-03 09:33:03 +01:00
|
|
|
import QtQuick
|
2026-03-04 19:56:12 +01:00
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQml.Models
|
2026-03-03 09:33:03 +01:00
|
|
|
|
|
|
|
|
Window {
|
|
|
|
|
width: 640
|
|
|
|
|
height: 480
|
|
|
|
|
visible: true
|
|
|
|
|
title: qsTr("Hello World")
|
2026-03-03 18:58:34 +01:00
|
|
|
|
2026-03-04 19:56:12 +01:00
|
|
|
ColumnLayout {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
Text {
|
|
|
|
|
text: "Model row count: " + mainModel.rowCount()
|
|
|
|
|
Layout.alignment: Layout.Center
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TableView {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
|
|
|
|
|
Layout.margins: 10
|
|
|
|
|
columnSpacing: 1
|
|
|
|
|
rowSpacing: 1
|
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
|
|
model: mainModel
|
|
|
|
|
|
|
|
|
|
delegate: Rectangle {
|
|
|
|
|
implicitWidth: 100
|
|
|
|
|
implicitHeight: 50
|
|
|
|
|
Text {
|
|
|
|
|
text: display
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-03 18:58:34 +01:00
|
|
|
}
|
2026-03-03 09:33:03 +01:00
|
|
|
}
|