diff options
Diffstat (limited to 'src/quickcontrols/universal/VerticalHeaderView.qml')
-rw-r--r-- | src/quickcontrols/universal/VerticalHeaderView.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quickcontrols/universal/VerticalHeaderView.qml b/src/quickcontrols/universal/VerticalHeaderView.qml index 189bed0906..43f8e6aeb8 100644 --- a/src/quickcontrols/universal/VerticalHeaderView.qml +++ b/src/quickcontrols/universal/VerticalHeaderView.qml @@ -10,7 +10,12 @@ import QtQuick.Controls.Universal.impl 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 { |