Commit 2507a24b authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Use QQuickView::setContent to set root component

Change-Id: I8d5700c71fd4e46f0463bf02195506251f71a853
Reviewed-by: default avatarThomas Hartmann <>
parent 3273bac2
......@@ -374,12 +374,10 @@ void NodeInstanceServer::setupImports(const QVector<AddImportContainer> &contain
componentString += QString("Item {}\n");
if (quickView()) {
QQuickViewPrivate::get(quickView())->component = new QQmlComponent(engine(), quickView());
m_importComponent = QQuickViewPrivate::get(quickView())->component;
} else {
m_importComponent = new QQmlComponent(engine(), 0);
m_importComponent = new QQmlComponent(engine(), quickView());
if (quickView())
quickView()->setContent(fileUrl(), m_importComponent, quickView()->rootObject());
m_importComponent->setData(componentString.toUtf8(), fileUrl());
m_importComponentObject = m_importComponent->create();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment