summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qheaderview.h
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-10-30 15:25:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 19:49:22 +0100
commite0fc088c0c8bc61dbcaf5928b24986cd61a22777 (patch)
tree40c475ef334eb309f332f80a3187e9dcab382732 /src/widgets/itemviews/qheaderview.h
parent3c2bfbff5f4c836de32628710ab7701b0db083f7 (diff)
Qt 5.0 QTreeView. Prevent manual moving of the first section
This prevents the user of moving the leftmost column. There will be no API to allow move of the tree-structure. It is very weird to do that, so it shouldn't be a problem. In case it is a big problem somewhere it can be hacked with: QTableView unused; unused.setVerticalHeader(tree->header()); tree->header()->setParent(tree); unused.setVerticalHeader(new QHeaderView(Qt::Horizontal)); Task-number: QTBUG-332 Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qheaderview.h')
-rw-r--r--src/widgets/itemviews/qheaderview.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qheaderview.h b/src/widgets/itemviews/qheaderview.h
index 1054e10ba1..847758aa12 100644
--- a/src/widgets/itemviews/qheaderview.h
+++ b/src/widgets/itemviews/qheaderview.h
@@ -240,6 +240,9 @@ protected:
QRegion visualRegionForSelection(const QItemSelection &selection) const;
void initStyleOption(QStyleOptionHeader *option) const;
+ friend class QTableView;
+ friend class QTreeView;
+
private:
Q_PRIVATE_SLOT(d_func(), void _q_sectionsRemoved(const QModelIndex &parent, int logicalFirst, int logicalLast))
Q_PRIVATE_SLOT(d_func(), void _q_layoutAboutToBeChanged())