The import QtQuick 2.7
The import QtQuick. Controls 2.1
The import QtQml. Models 2.13
The import QtQuick. Controls 1.4
The import QtQuick. Controls. Styles section 1.4
The import QtQuick. Windows 2.13
The import haisong 1.0
The Window {
Id: mainWindow
Visible: true
X: 50; Y: 50
MinimumWidth: 800
MinimumHeight: 600
A Rectangle {
Id: leftView
Anchors. The fill: parent
Color: "white"
TreeView {
Id: the treeView
Anchors. The fill: parent
HeaderVisible: false
BackgroundVisible: false
FrameVisible: false
Model: myModel
RowDelegate: Rectangle {
Height: 30
Color: "# 303030"
}
ItemDelegate: Rectangle {
Color: "# 454545"
Height: 30
The Text {
Id: contentTex
X: 25
Color: "white"
Anchors. VerticalCenter: parent. VerticalCenter
Text: styleData. Value. The type + ":" + styleData. Value. The size
}
}
TableViewColumn {
Role: "type"
Title: "Type"
}
}
}
}