diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2024-02-05 18:45:12 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2024-02-09 17:12:23 +0100 |
commit | 02a77600e50cbb7eb9f833d7eaa30b4b0efb47a4 (patch) | |
tree | 484a1c4bd2793ebb908198de7bfd5adc62828bdd /src/widgets/itemviews/qheaderview.cpp | |
parent | 41b76ffbd0993997f541436b1235407b00c542f9 (diff) |
QHeaderView: make sectionsMovable/sectionsClickable properties
When those two attributes were added in Qt5 they were not marked as
property for unknown reason. Therefore propagate them now.
Fixes: QTBUG-1639
Change-Id: If9f0def2eb680c9c9e8a04b101768d87885d542b
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qheaderview.cpp')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index c7da20068c..2bc6a84f37 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -1056,19 +1056,22 @@ int QHeaderView::logicalIndex(int visualIndex) const } /*! - \since 5.0 + \property QHeaderView::sectionsMovable - If \a movable is true, the header sections may be moved by the user; + If \a sectionsMovable is true, the header sections may be moved by the user; otherwise they are fixed in place. When used in combination with QTreeView, the first column is not movable (since it contains the tree structure), by default. You can make it movable with setFirstSectionMovable(true). - \sa sectionsMovable(), sectionMoved() + \sa sectionMoved() \sa setFirstSectionMovable() */ +/*! + Sets \l sectionsMovable to \a movable. + */ void QHeaderView::setSectionsMovable(bool movable) { Q_D(QHeaderView); @@ -1076,17 +1079,8 @@ void QHeaderView::setSectionsMovable(bool movable) } /*! - \since 5.0 - - Returns \c true if the header can be moved by the user; otherwise returns - false. - - By default, sections are movable in QTreeView (except for the first one), - and not movable in QTableView. - - \sa setSectionsMovable() + Returns \l sectionsMovable. */ - bool QHeaderView::sectionsMovable() const { Q_D(const QHeaderView); @@ -1130,14 +1124,17 @@ bool QHeaderView::isFirstSectionMovable() const } /*! - \since 5.0 + \property QHeaderView::sectionsClickable - If \a clickable is true, the header will respond to single clicks. + Holds \c true if the header is clickable; otherwise \c false. A + clickable header could be set up to allow the user to change the + representation of the data in the view related to the header. - \sa sectionsClickable(), sectionClicked(), sectionPressed(), - setSortIndicatorShown() + \sa sectionPressed(), setSortIndicatorShown() +*/ +/*! + Set \l sectionsClickable to \a clickable. */ - void QHeaderView::setSectionsClickable(bool clickable) { Q_D(QHeaderView); @@ -1145,15 +1142,8 @@ void QHeaderView::setSectionsClickable(bool clickable) } /*! - \since 5.0 - - Returns \c true if the header is clickable; otherwise returns \c false. A - clickable header could be set up to allow the user to change the - representation of the data in the view related to the header. - - \sa setSectionsClickable() + Returns \l sectionsClickable. */ - bool QHeaderView::sectionsClickable() const { Q_D(const QHeaderView); |