Filling QML ListView with data from std::map
<p>I'm having trouble finding a good way to display the items of a <code>std::map</code> in QML. We're using a MVVM pattern in our application. The <code>std::map</code> contains file paths and is a member of a configuration class in the model.
Now I'm trying to show all entries of the map in QML, probably using a <code>ListView</code> item.
Currently we just have a couple of file paths in the configuration, so these are exposed as <code>Q_PROPERTY</code>ies to the view model and then further to QML. But, of course, the number of paths can and will grow, thus my idea using a <code>std::map</code> for this. It won't be necessary to have it 'growable' at runtime, at least not in the forseeable future. But writing lots and lots of <code>Q_PROPERTY</code>ies doesn't seem the right way for me.</p>

<p>Furhter question: How would I access/display the items of the map in a QML <code>ListView</code> - I can't figure it out and I can't find anything helpful online.</p>