0
平臺:win8的,qt5.0qml文件在qrc中不起作用?
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>