有没有什么方法可以用字符串数据加载QQuickView?据我所知,只有void QQuickView::setSource(const QUrl & url)。
我可以使用字符串数据加载QQmlComponent,但现在如何将此组件分配给QQuickView
发布于 2015-01-12 20:55:22
您可以在创建QQmlComponent时传入QQuickView的引擎:
QQmlComponent component(view->engine(), QUrl("path/to/file.qml"));https://stackoverflow.com/questions/27901629
复制相似问题