aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2023-01-19 15:13:37 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2023-01-25 10:01:01 +0100
commitad0e8277fc465e32695344d29dbebe558bf6875f (patch)
tree681c395574541251e76876a74eab5e64118c2f2d /src
parent70f1732ee6f9ad3c895061acd55cef3e21c5094f (diff)
HeaderView: set resizableRows/Columns to true by default
In 6.5, you can now set resizableRows and resizableColumns on a HeaderView. Follow the same logic as in QHeaderView, and let them be true by default. Pick-to: 6.5 Change-Id: I184f2682e52460447efdf713586308c270c95e06 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates/qquickheaderview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quicktemplates/qquickheaderview.cpp b/src/quicktemplates/qquickheaderview.cpp
index 9c9f0ffc43..0d9bc5588c 100644
--- a/src/quicktemplates/qquickheaderview.cpp
+++ b/src/quicktemplates/qquickheaderview.cpp
@@ -21,6 +21,9 @@
also have its own model. If the model is a QAbstractTableModel, then
the header will display the model's horizontal headerData(); otherwise,
the model's data().
+
+ A HorizontalHeaderView will have
+ \l {resizableColumns}{TableView::resizableColumns} set to \c true by default.
*/
/*!
@@ -40,6 +43,9 @@
also have its own model. If the model is a QAbstractTableModel, then
the header will display the model's vertical headerData(); otherwise,
the model's data().
+
+ A VerticalHeaderView will have
+ \l {resizableRows}{TableView::resizableRows} set to \c true by default.
*/
/*!
@@ -461,6 +467,7 @@ QQuickHorizontalHeaderView::QQuickHorizontalHeaderView(QQuickItem *parent)
: QQuickHeaderViewBase(Qt::Horizontal, parent)
{
setFlickableDirection(FlickableDirection::HorizontalFlick);
+ setResizableColumns(true);
}
QQuickHorizontalHeaderView::~QQuickHorizontalHeaderView()
@@ -471,6 +478,7 @@ QQuickVerticalHeaderView::QQuickVerticalHeaderView(QQuickItem *parent)
: QQuickHeaderViewBase(Qt::Vertical, parent)
{
setFlickableDirection(FlickableDirection::VerticalFlick);
+ setResizableRows(true);
}
QQuickVerticalHeaderView::~QQuickVerticalHeaderView()