-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTreePanel.qml
More file actions
77 lines (68 loc) · 1.87 KB
/
TreePanel.qml
File metadata and controls
77 lines (68 loc) · 1.87 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as QQC1
import QtQml.Models 2.2 as QQC1MODELS
import My 1.0
BasePanel {
TreeModel {
id: model
objectName: "model"
// model: myModel
}
QQC1MODELS.ItemSelectionModel {
id: selModel
model: model
onSelectionChanged: {
var ind = selModel.currentIndex
backend.spotBarItem(ind)
}
}
QQC1.TreeView {
id: barTree
objectName: "tree"
height: parent.height
width: parent.width
model: model
selection: selModel
QQC1.TableViewColumn {
role: "name"
title: "Barcode"
}
itemDelegate: Item {
Text {
width: 10
text: styleData.value
// text: styleData.value.indentation + ": " + styleData.value.text
// text: display.toString()
anchors.fill: parent
color: styleData.textColor
elide: styleData.elideMode
}
}
QQC1.TableViewColumn {
role: "visible"
title: "Visability"
}
// onSelectionChanged: {
// var ind = selModel.currentIndex
// backend.spotBarItem(ind)
// }
// onClicked: {
// var ind = selModel.currentIndex
// backend.spotBarItem(ind)
// }
// selection: ItemSelectionModel {
// }
// QQC1.TableViewColumn {
// role: "name"
// title: "Object"
// }
}
//RoundButton { // Qt >= 5.8.0
// IconButton {}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/