Hi Andre,
Yes, it depends :)
And I find another way to play with ListView model
qmlRegisterType a customized C++ Model such as:
@
qmlRegisterType<MyModel>("cn.com.isoft.demo", 1, 0, "MyModel");
@
QStringList property such as:
@
Q_PROPERTY(QStringList myLists READ myLists NOTIFY myListsChanged)
@
put MyModel in QML such as:
@
import cn.com.i-soft.demo 1.0
...
ListView {
...
MyModel {
id: myModel
}
model: myModel.myLists
delegate: Rectangle {
...
Text { text: modelData }
}
}
@
Regards,
Leslie Zhai