Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Rethinking my project: need ideas for Dashboard software programming
I have to rethink my development and I need your advice because I can't get any results.
I have a software that loads a configuration at startup.
I have now solved this with a JSON. It contains so-called DataSources with the properties ID, name, data type.
When loading the data sources, I created an object for each one and packed it into a QAbstractListModel via Qlist<myobject>.
In my current attempt I loaded these data sources into a QAbstractListModel to display them in QML. But this doesn't work because I can't access elements from the model in "realtime":
The program should work in such a way that one chooses one or more data sources by dropdown list (or similar) and creates a gauge with the desired source.
The data is sent via UDP to my program. with a tickrate of minimum 100 Hz
Which is the best approach to manage the data sources and then display them or access them individually in QML? With my approach (QAbstractListModel) I don't get a result because I can't access single elements from the model so they will be updated in QML in real time. Maybe there is a much better approach.
Here the current repo!
Rather than expected people scanning your complete project, you should rather post the bits that are currently posing problems or at least point precisely where they can be found.
As for your problem, QAbstractListModel is completely usable with QML.
One thing to take into account: refreshing data at at least 100Hz is useless, most of the current monitors works at 60Hz and the human brain processes 25 frames per second at most.
@SGaist The problem is that I can't get help here with getting access to single items from QML. I also can't find a documentation how to solve this. Only how to show the complete content of the model in a list.
If you can tell me how to get access to a single item from QML and get it updated automatically updated it would be very helpful for me
If you are interested in only a single element value, are you sure that a model is the best way to handle that ? You should maybe consider setting up some watcher object based on some selection or configuration.
@SGaist no i'm not sure if it is the best way, thats why I'm asking
But it was the only way that i found, how to handle/organize objects that where created during runtime.
Do you have a example for those "watcher objects" `?
What are these objects you want to organise ?