Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt training treeview-model invalid index
Elbujito last edited by
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 ?