Example of correctly operating C++ model with QML TreeView
-
Hi fiends,
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.
-
-
@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.
-
And you can get a look here if you need more details :
http://forum.qt.io/topic/56497/request-treeview-c-model-to-qml-example/2