aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/universal/HorizontalHeaderView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/universal/HorizontalHeaderView.qml')
-rw-r--r--src/quickcontrols/universal/HorizontalHeaderView.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quickcontrols/universal/HorizontalHeaderView.qml b/src/quickcontrols/universal/HorizontalHeaderView.qml
index 878fb1e10e..3700008e92 100644
--- a/src/quickcontrols/universal/HorizontalHeaderView.qml
+++ b/src/quickcontrols/universal/HorizontalHeaderView.qml
@@ -11,7 +11,12 @@ T.HorizontalHeaderView {
id: control
implicitWidth: syncView ? syncView.width : 0
- implicitHeight: contentHeight
+ // The contentHeight of TableView will be zero at start-up, until the delegate
+ // items have been loaded. This means that even if the implicit height of
+ // HorizontalHeaderView should be the same as the content height in the end, we
+ // need to ensure that it has at least a height of 1 at start-up, otherwise
+ // TableView won't bother loading any delegates at all.
+ implicitHeight: Math.max(1, contentHeight)
delegate: Rectangle {
// Qt6: add cellPadding (and font etc) as public API in headerview