@avio said in Qt Creator: query on GraphsView and C++ model interaction::
@JKSH Many thanks, your help is very much appreciated. I have followed your advice: excellent result! I guess this approach should also work well for real-time data streaming from the C++ backend.
Great to hear! You're welcome.
Before I close this conversation, I have a question, though, if I may, about the view-model approach I originally attempted. Surely, that must work too. Further debugging has shown that QML does call "QVariant data(const QModelIndex &index, int role) with a valid "index". Yet, "role" has got "random" values nowhere near the ones (257, 258) in the enum role below
We'll need to see your QML code (how you integrate your model with the GraphsView) to be able to say what went wrong. Seeing your implementation of List2dPlotModel::data() could also be helpful.