aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/imagine/VerticalHeaderView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/imagine/VerticalHeaderView.qml')
-rw-r--r--src/quickcontrols/imagine/VerticalHeaderView.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quickcontrols/imagine/VerticalHeaderView.qml b/src/quickcontrols/imagine/VerticalHeaderView.qml
index a59e228d20..5ff9043f93 100644
--- a/src/quickcontrols/imagine/VerticalHeaderView.qml
+++ b/src/quickcontrols/imagine/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 {