Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Is it actually possible to use a C++ QList as a model for a QML PathView?

$
0
0
I’ve already asked this question on stack overflow, but I thought I’d ask here where the real Qt experts are. http://stackoverflow.com/questions/15753419/qt-qml-data-model-doesnt-seem-to-work-with-c [stackoverflow.com] The executive summary is that if I have a QML ListModel, I can set that as the model for either a QML ListView or a QML PathView. If I have C++ objects in a QList<>, which is what some of the QML data model examples do, I can create a working model for QML ListViews, but not QML PathViews. There seems to be something that ListView has that QList<MyClass> doesn’t – some glue that gets PathView working but is missing when I make my QList. I’m using Qt 4.8.4 on Windows. Any ideas? Does anyone know of a sample or an example that does this? Something that populates a PathView with a C++ model? Any C++ model, QList-based or QAbstractListModel-based, would be fine.

Viewing all articles
Browse latest Browse all 4972

Trending Articles