diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-29 01:00:05 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-29 01:00:06 +0100 |
commit | 2a809ef65797e42eac608cdd69a63e37d63521ae (patch) | |
tree | 823d035b758e43d9befc50d26d24a8b738b14e6d /src/quick/items/qquicktableview.cpp | |
parent | c8b731829948c620e207e82b5fe106034dff4ede (diff) | |
parent | fcf7b513d9e5b04213fbe5254f10af0f694ea8aa (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic754916ddc223c6ce20f0298eec02a3513fc0222
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 5550ed0a78..ec2fe75d9b 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -2711,6 +2711,23 @@ void QQuickTableView::setContentHeight(qreal height) QQuickFlickable::setContentHeight(height); } +/*! + \qmlproperty TableView QtQuick::TableView::syncView + + If this property of a TableView is set to another TableView, both the + tables will synchronize with regard to flicking, column widths/row heights, + and spacing according to \l syncDirection. + + If \l syncDirection contains \l Qt.Horizontal, current tableView's column + widths, column spacing, and horizontal flicking movement synchronizes with + syncView's. + + If \l syncDirection contains \l Qt.Vertical, current tableView's row + heights, row spacing, and vertical flicking movement synchronizes with + syncView's. + + \sa syncDirection +*/ QQuickTableView *QQuickTableView::syncView() const { return d_func()->assignedSyncView; @@ -2728,6 +2745,24 @@ void QQuickTableView::setSyncView(QQuickTableView *view) emit syncViewChanged(); } +/*! + \qmlproperty Qt::Orientations QtQuick::TableView::syncDirection + + If the \l syncView is set on a TableView, this property controls + synchronization of flicking direction(s) for both tables. The default is \c + {Qt.Horizontal | Qt.Vertical}, which means that if you flick either table + in either direction, the other table is flicked the same amount in the + same direction. + + This property and \l syncView can be used to make two tableViews + synchronize with each other smoothly in flicking regardless of the different + overshoot/undershoot, velocity, acceleration/deceleration or rebound + animation, and so on. + + A typical use case is to make several headers flick along with the table. + + \sa syncView, headerView +*/ Qt::Orientations QQuickTableView::syncDirection() const { return d_func()->assignedSyncDirection; |