Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
About data model and data storage
_Mark_ last edited by
I'd like to discuss the best way to store and handle data. Currently I acquire real-time data from the field using different channels (i.e. rs232, ethernet, user interface, etc...). I have a struct which is a "snapshot" of the system at the current time.
I do two things with this struct:
- show the content on a table
- log into a file (each time the struct changes or on specified intervals)
My questions are:
a) I would use a model-based QTableView to how the data. How to organized the struct and the model class? I'm talking about both the model class and the I/O class should access to the struct and I wonder where and how to declare it.
b) is the struct the recommended way? Do you suggest something else?