forked from qt-creator/qt-creator
QmlDesigner: Use QQuickView::setContent to set root component
Change-Id: I8d5700c71fd4e46f0463bf02195506251f71a853 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -374,12 +374,10 @@ void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &contain
|
|||||||
|
|
||||||
componentString += QString("Item {}\n");
|
componentString += QString("Item {}\n");
|
||||||
|
|
||||||
if (quickView()) {
|
m_importComponent = new QQmlComponent(engine(), quickView());
|
||||||
QQuickViewPrivate::get(quickView())->component = new QQmlComponent(engine(), quickView());
|
|
||||||
m_importComponent = QQuickViewPrivate::get(quickView())->component;
|
if (quickView())
|
||||||
} else {
|
quickView()->setContent(fileUrl(), m_importComponent, quickView()->rootObject());
|
||||||
m_importComponent = new QQmlComponent(engine(), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_importComponent->setData(componentString.toUtf8(), fileUrl());
|
m_importComponent->setData(componentString.toUtf8(), fileUrl());
|
||||||
m_importComponentObject = m_importComponent->create();
|
m_importComponentObject = m_importComponent->create();
|
||||||
|
|||||||
Reference in New Issue
Block a user