mathieuS
11th January 2011, 20:54
Hi everybody
I created a tree model subclassing QAbstractItemModelwhich I render using a QTreeView.
When I edit an item and press the tab key, the editor jumps to the item in the next row, same column. I'd like the converse, I would like the editor to jump in the next column, same row.
All I found in Qt Assistant was this mysterious statement :
... the current index defines the next and previous items to edit, ...
in the documentation for QAbstractItemView::edit().
Though, I don't understand how a QModelIndex may hold other indexes than parent's and children's.
Thank you for lightning my candle,
Mathieu
I created a tree model subclassing QAbstractItemModelwhich I render using a QTreeView.
When I edit an item and press the tab key, the editor jumps to the item in the next row, same column. I'd like the converse, I would like the editor to jump in the next column, same row.
All I found in Qt Assistant was this mysterious statement :
... the current index defines the next and previous items to edit, ...
in the documentation for QAbstractItemView::edit().
Though, I don't understand how a QModelIndex may hold other indexes than parent's and children's.
Thank you for lightning my candle,
Mathieu