QModelIndex: Get for same column in parent?
-
Hello,
I'm working with the sample code at:
http://doc.qt.nokia.com/latest/itemviews-simpletreemodel.htmlGiven a QModelIndex pointing at a certain item, how do I get a QModelIndex for the item's parent that points to the same column?
Just calling someIndex.parent() will always return a QModelIndex with column == 0.
In this sample case, since each row has the same number of columns, so we know for sure that every parent (other than the invisible root) certainly has such a column.
What is the correct method?
Thank you