VerticalHeaderViewDelegate.qml 976 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2025 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // Qt-Security score:significant reason:default
  4. import QtQuick
  5. import QtQuick.Templates as T
  6. T.HeaderViewDelegate {
  7. id: control
  8. // same as AbstractButton.qml
  9. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  10. implicitContentWidth + leftPadding + rightPadding)
  11. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  12. implicitContentHeight + topPadding + bottomPadding)
  13. padding: 8
  14. highlighted: selected
  15. background: Rectangle {
  16. border.color: "#e4e4e4"
  17. color: "#f6f6f6"
  18. }
  19. contentItem: Label {
  20. horizontalAlignment: Text.AlignHCenter
  21. verticalAlignment: Text.AlignVCenter
  22. color: "#ff26282a"
  23. text: control.model[control.headerView.textRole]
  24. }
  25. }