Significance of the row parameter in QTreeView::setRowHidden
setRowHiddenmember function. The function takes three arguments. While the second (parent
QModelIndex) and the third (a boolean) are easy to understand, what does the
int rowparameter signify? In a tree, the rows cannot be numbered linearly trivially, does
rowimply the insertion order in which it was inserted to some parent? Or something else?
@ajaxcrypto Hi,friend. Welcome.
QTreeView, when we use
row, we should give the
row's parent index. about this, the model/view programming. In
Basic conceptssection. It tell different in
QTreeView. It will help you better than me.
rowsignifies the order in which the row was inserted/added for the given parent.
No, it seems to me the http://doc.qt.io/qt-4.8/model-view-programming.html#basic-concepts link @joeQ gave you shows in the diagram what the
rowdefinition is for a Tree Model. Did you look at it?
To be clear, it is the current order of children at each level, not the order they were added --- although those two might be the same if all you do is append, you can also do inserts into the middle of the children, or deletes, which will change the row numbering.
Well yes, the model will not be inserting, only appending rows so in my case, it matches the insertion order. You are completely correct however.