aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/fusion/VerticalHeaderView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/fusion/VerticalHeaderView.qml')
-rw-r--r--src/quickcontrols/fusion/VerticalHeaderView.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quickcontrols/fusion/VerticalHeaderView.qml b/src/quickcontrols/fusion/VerticalHeaderView.qml
index 7ae2fcdd62..2e9ef6d753 100644
--- a/src/quickcontrols/fusion/VerticalHeaderView.qml
+++ b/src/quickcontrols/fusion/VerticalHeaderView.qml
@@ -7,7 +7,12 @@ import QtQuick.Templates as T
T.VerticalHeaderView {
id: control
- implicitWidth: contentWidth
+ // The contentWidth of TableView will be zero at start-up, until the delegate
+ // items have been loaded. This means that even if the implicit width of
+ // VerticalHeaderView should be the same as the content width in the end, we
+ // need to ensure that it has at least a width of 1 at start-up, otherwise
+ // TableView won't bother loading any delegates at all.
+ implicitWidth: Math.max(1, contentWidth)
implicitHeight: syncView ? syncView.height : 0
delegate: Rectangle {