Qt training treeview-model invalid index
int ReadOnlyModel::rowCount(const QModelIndex &parent) const
Node *parentNode = nodeForIndex(parent);
In the web tuto of qt training they explain how to create Tree View using model and how to use drag and drop in the model. I have found the source code on github.
When I test the row count parent is always invalid and I don't know why, how to modify the source code for get a valid index ? Anybody have an idear please ?