Example of correctly operating C++ model with QML TreeView
Kofr last edited by Kofr
I am trying to the best of my ability to make QML TreeView to work with C++ model.
I am cennecting Data Model as C++ class
qmlRegisterType<TreeModel>("dataModel", 1, 0, "DataModel");
If you have working example of TreeView working with C++ model such way, please share it.
Kofr last edited by
@p3c0 It is Widgets example. QML QtQuick example is needed
@Kofr yes it is. But you can make it work with QML with the changes I mentioned earlier. Just extract the model part and add those changes. It works.
Bowisse last edited by Bowisse
And you can get a look here if you need more details :