From 658e42e77a00596b63823482c9b77644556b647c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Thu, 6 Dec 2012 10:42:53 +0100 Subject: QTreeView - allow users to control data in the treestructure This patch allows to set which logical index the tree is in. Before the tree always displayed data from the logical index 0, but it is actually more likely that the user wants to have data from visual index 0 (which can be done by special value -1). There is nothing special about logical index 0, and not being able to change the tree-data is just annoying. Change-Id: Ib070ce93343a0d2fbac3ad5a42cb4359401ac87c Reviewed-by: Stephen Kelly --- src/widgets/itemviews/qtreeview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/itemviews/qtreeview.h') diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h index fae814c6f6..d9c6cd9269 100644 --- a/src/widgets/itemviews/qtreeview.h +++ b/src/widgets/itemviews/qtreeview.h @@ -128,6 +128,9 @@ public: void setWordWrap(bool on); bool wordWrap() const; + void setTreePosition(int logicalIndex); + int treePosition() const; + void keyboardSearch(const QString &search); QRect visualRect(const QModelIndex &index) const; -- cgit v1.2.3