PDA

View Full Version : how to move between columns in tree view?



Scott Shiff
30th January 2007, 07:43
How do I enable the user moving between the columns in a QTreeView? I'm using a QStandardItemModel with 2 columns, and each item is a QStandardItem. If I do a

setSelectionBehavior( QAbstractItemView::SelectItems )

the right arrow key does an expand-tree and the tab key (which is enabled) moves to the next row.

I want the user to enter some data in the first column and then be moved (or be able to move) to the second. How do I do this?

wysota
30th January 2007, 09:01
I think you can do that by reimplementing the key event handler for the view (using an eventFilter for example).