little breakthrought im QML Layouts
This commit is contained in:
26
qml/VerticalHeaderViewDelegate.qml
Normal file
26
qml/VerticalHeaderViewDelegate.qml
Normal file
@@ -0,0 +1,26 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Control {
|
||||
id: container
|
||||
|
||||
required property int row
|
||||
required property var model
|
||||
|
||||
padding: 8
|
||||
|
||||
background: Rectangle {
|
||||
color: tapHandler.pressed ? "gray" : "lightgray"
|
||||
|
||||
TapHandler {
|
||||
id: tapHandler
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
text: container.model.display
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user