From f32e28db1850f09a7082ccd2090b3ec4cea1703e Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Mon, 28 Mar 2022 11:19:08 +0800 Subject: [PATCH] QTableView: Document the customizations applied to QHeaderView These are non-default options which the user needs to manually set when applying a custom QHeaderView. Task-number: QTBUG-102034 Pick-to: 6.3 6.2 5.15 Change-Id: Ib3396f0a82c358c71a8501fc2d71158f725bc228 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Leena Miettinen --- src/widgets/itemviews/qtableview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp index d1b82c2511..5300150ea1 100644 --- a/src/widgets/itemviews/qtableview.cpp +++ b/src/widgets/itemviews/qtableview.cpp @@ -1165,6 +1165,8 @@ int QTableViewPrivate::heightHintForIndex(const QModelIndex &index, int hint, QS table can be found by using rowHeight(); similarly, the width of columns can be found using columnWidth(). Since both of these are plain widgets, you can hide either of them using their hide() functions. + Each header is configured with its \l{QHeaderView::}{highlightSections} + and \l{QHeaderView::}{sectionsClickable} properties set to \c true. Rows and columns can be hidden and shown with hideRow(), hideColumn(), showRow(), and showColumn(). They can be selected with selectRow()