looking better.
This commit is contained in:
48
qml/xqtreeview.qml
Normal file
48
qml/xqtreeview.qml
Normal file
@@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
TreeView
|
||||
{
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
columnSpacing: 1
|
||||
rowSpacing: 1
|
||||
|
||||
model: xtrChildModel
|
||||
|
||||
columnWidthProvider: function(column)
|
||||
{
|
||||
var z= 1.7*(width / columns);
|
||||
console.log("höh!");
|
||||
return z;
|
||||
}
|
||||
|
||||
delegate: Rectangle
|
||||
{
|
||||
required property int row
|
||||
required property int column
|
||||
required property var model
|
||||
|
||||
border.width: 0
|
||||
|
||||
implicitWidth: 30
|
||||
implicitHeight: 20
|
||||
border.color: "#cccccc"
|
||||
//color: index % 2 === 0 ? "#f9f9f9" : "#e0e0e0"
|
||||
color: TreeView.isSelected ? "#d0eaff" : (row % 2 === 0 ? "#f9f9f9" : "#ffffff")
|
||||
|
||||
Text
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
text: display
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
||||
ScrollBar.horizontal: ScrollBar {}
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user