Qt 5.0 QTreeView. Prevent manual moving of the first section
authorThorbjørn Lund Martsum <tmartsum@gmail.com>
Tue, 30 Oct 2012 14:25:02 +0000 (15:25 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 2 Nov 2012 18:49:22 +0000 (19:49 +0100)
commite0fc088c0c8bc61dbcaf5928b24986cd61a22777
tree40c475ef334eb309f332f80a3187e9dcab382732
parent3c2bfbff5f4c836de32628710ab7701b0db083f7
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>
src/widgets/itemviews/qheaderview.cpp
src/widgets/itemviews/qheaderview.h
src/widgets/itemviews/qheaderview_p.h
src/widgets/itemviews/qtableview.cpp
src/widgets/itemviews/qtreeview.cpp
tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
tests/manual/widgets/itemviews/qtreeview/main.cpp [new file with mode: 0644]
tests/manual/widgets/itemviews/qtreeview/qtreeviewtest.pro [new file with mode: 0644]