12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import QtQuick
- import QtQuick.Templates as T
- T.HorizontalHeaderView {
- id: control
- implicitWidth: syncView ? syncView.width : 0
- implicitHeight: contentHeight
- delegate: Rectangle {
-
- readonly property real cellPadding: 8
- implicitWidth: text.implicitWidth + (cellPadding * 2)
- implicitHeight: Math.max(control.height, text.implicitHeight + (cellPadding * 2))
- color: "#f6f6f6"
- border.color: "#e4e4e4"
- Text {
- id: text
- text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole]
- : model[control.textRole])
- : modelData
- width: parent.width
- height: parent.height
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- color: "#ff26282a"
- }
- }
- }
|