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>bb10
parent
41b76ffbd0
commit
02a77600e5
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class Q_WIDGETS_EXPORT QHeaderView : public QAbstractItemView
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(bool firstSectionMovable READ isFirstSectionMovable WRITE setFirstSectionMovable)
|
||||
Q_PROPERTY(bool showSortIndicator READ isSortIndicatorShown WRITE setSortIndicatorShown)
|
||||
Q_PROPERTY(bool sectionsMovable READ sectionsMovable WRITE setSectionsMovable)
|
||||
Q_PROPERTY(bool sectionsClickable READ sectionsClickable WRITE setSectionsClickable)
|
||||
Q_PROPERTY(bool highlightSections READ highlightSections WRITE setHighlightSections)
|
||||
Q_PROPERTY(bool stretchLastSection READ stretchLastSection WRITE setStretchLastSection)
|
||||
Q_PROPERTY(bool cascadingSectionResizes READ cascadingSectionResizes
|
||||
|
|
|
|||
Loading…
Reference in New Issue