平台:win8,qt5.0
this->engine = new QQmlEngine;
this->component = new QQmlComponent(this->engine, ":/Foodie.qml");
this->mainWindow = new QQuickWindow;
while(this->component->isReady()) {
this->mainItem = qobject_cast<QQuickItem*>(component->create());
this->mainItem->setParentItem(this->mainWindow->contentItem());
break;
}
<RCC>
<qresource prefix="/">
<file>Foodie.qml</file>
</qresource>
</RCC>
答案 0 :(得分:0)
see this passage.. component would not load auto.