diff options
author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-02-08 15:01:24 +0100 |
---|---|---|
committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-05-21 15:31:51 +0200 |
commit | bad81267afd1fc73f9b63252b5dbf28eed915165 (patch) | |
tree | 291d594c6256423ec6f04832b01bed2e2523c383 /src/quickcontrols | |
parent | 033d0e507785a71b5dcf6a6e5f6c72ce50d2377e (diff) |
Support moving sections (row and column) in quick table view
Add support in quick table view to reorder rows and columns.
The properties 'movableColumns' and 'movableRows' enable the header
view to reorder columns and rows, which are disabled by default.
These properties allow the user to drag and drop sections for the
row and column reordering. It is to be noted that these properties
apply only to the header view (HorizontalHeaderView and
VerticalHeaderView) and do not apply to the TableView directly.
The change in the header view will be synced to the table view by
setting the corresponding view to the syncView property in the
header view.
The TableView can also explicitly reorder columnsĀ and rows through
the public API moveColumn() and moveRow().
Task-number: QTBUG-100440
Change-Id: I320b91c5541836fa0c885f75c59dcde3608cf3c2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quickcontrols')
-rw-r--r-- | src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc b/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc index 5115149762..fdc191be3f 100644 --- a/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc +++ b/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc @@ -84,3 +84,21 @@ The warning can be silenced by setting the \l textRole. \sa QAbstractItemModel::roleNames() //! [textRole] + +//! [movableColumns] +This property allows the user to move columns in the view. The default value is +\c false. + +\note If this property is set, the HorizontalHeaderView allows the user to drag +and drop columns at the required position. When syncView is enabled, +any change will be applied to the corresponding view item. +//! [movableColumns] + +//! [movableRows] +This property allows the user to move rows in the view. The default value is \c +false. + +\note If this property is set, the VerticalHeaderView allows the user to drag +and drop rows at the required position. When syncView is enabled, +any change will be applied to the corresponding view item. +//! [movableRows] |