aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-09 14:03:14 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-10 14:58:51 +0000
commit481ea25bc8aa64e7131edd85a6c871b2a3193f58 (patch)
tree3c52abef78a2321e8baf47c339a53bb2c740f648 /src/quick/items/qquicktableview_p.h
parent886d463061ba34802bf844133396e3706d6912a4 (diff)
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 <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview_p.h')
-rw-r--r--src/quick/items/qquicktableview_p.h2
1 files changed, 2 insertions, 0 deletions
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: