From 481ea25bc8aa64e7131edd85a6c871b2a3193f58 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 9 Aug 2018 14:03:14 +0200 Subject: QQuickTableView: add a 'forceLayout()' function to the public API This function needs to be called from the application whenever it needs to change column widths (or row heights) for the currently visible columns. Changing column widths is done by changing what values the columnWidthProvider returns. But TableView doesn't know that the assigned function has new values to return for the current columns. Calling 'forceLayout()' will inform about this, and trigger a re-layout. Change-Id: I3cf15bbfb522baf93c7e01a34841e54455a098b9 Reviewed-by: Mitch Curtis Reviewed-by: J-P Nurmi Reviewed-by: Shawn Rutledge --- src/quick/items/qquicktableview_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items/qquicktableview_p.h') diff --git a/src/quick/items/qquicktableview_p.h b/src/quick/items/qquicktableview_p.h index 513e644e43..ff9a22f9af 100644 --- a/src/quick/items/qquicktableview_p.h +++ b/src/quick/items/qquicktableview_p.h @@ -129,6 +129,8 @@ public: qreal explicitContentHeight() const; void setExplicitContentHeight(qreal height); + Q_INVOKABLE void forceLayout(); + static QQuickTableViewAttached *qmlAttachedProperties(QObject *); Q_SIGNALS: -- cgit v1.2.3