-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.qml
More file actions
36 lines (30 loc) · 841 Bytes
/
main.qml
File metadata and controls
36 lines (30 loc) · 841 Bytes
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
import QtQuick 2.12
import QtQuick.Window 2.12
import TableModel 0.1
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
TableView {
anchors.fill: parent
columnSpacing: 1
rowSpacing: 1
clip: true
model: TableModel {}
delegate: Rectangle {
implicitWidth: 150
implicitHeight: 50
border.color: "black"
border.width: 2
color: (heading==true)?"red":"green"
TableView.onPooled: console.log(tabledata + " pooled")
TableView.onReused: console.log(tabledata + " resused")
Text {
text: tabledata
font.pointSize: 12
anchors.centerIn: parent
}
}
}
}