请教c++写好的mode如何动态的绑定到指定的Qml页的ListModel中
QList<QObject*> dataList;定义了一个model,内容是Name,value键值对的形式
BookFeeds.qml页有一个ListModel {id: bookFeeds}
在qt5.1.0中通过:
QQuickView view;
QQmlContext *ctxt = view.rootContext();
ctxt->setContextProperty("bookFeeds", QVariant::fromValue(dataList));
没能绑定成功,请教如何绑定?新手多谢指教。