Populating QAbstractListModel's current item values in controls
I have the following UI in my application:
The ComboBox (Qt Quick Control 5.1) would use a QAbstractListItem-based subclass to populate itself. A subclass instance would be exposed to the QML through setContextProperty("dataModel", &dataModel).
Now, based on the current index of the ComboBox, I want to populate the rest of the controls, using dataModel's current object.
Basically, I am not getting hold of how to access the dataModel instance (and the underlying data store) everywhere in the app.
Or is my approach wrong? If so, then what would be a better alternative?