aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/ios/VerticalHeaderView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/ios/VerticalHeaderView.qml')
-rw-r--r--src/quickcontrols/ios/VerticalHeaderView.qml14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/quickcontrols/ios/VerticalHeaderView.qml b/src/quickcontrols/ios/VerticalHeaderView.qml
index 6015a800b1..179bc35b23 100644
--- a/src/quickcontrols/ios/VerticalHeaderView.qml
+++ b/src/quickcontrols/ios/VerticalHeaderView.qml
@@ -1,6 +1,8 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
import QtQuick
import QtQuick.Templates as T
@@ -16,6 +18,10 @@ T.VerticalHeaderView {
implicitHeight: syncView ? syncView.height : 0
delegate: Rectangle {
+ id: delegate
+
+ required property var model
+
readonly property real cellPadding: 8
implicitWidth: Math.max(control.width, text.implicitWidth + (cellPadding * 2))
@@ -24,11 +30,9 @@ T.VerticalHeaderView {
Label {
id: text
- text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole]
- : model[control.textRole])
- : modelData
- width: parent.width
- height: parent.height
+ text: delegate.model[control.textRole]
+ width: delegate.width
+ height: delegate.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}