【问题标题】:qml file not work in qrc?qml 文件在 qrc 中不起作用?
【发布时间】:2013-03-24 12:07:43
【问题描述】:

平台: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>

【问题讨论】:

    标签: qt qml


    【解决方案1】:
    see this passage..  component would not load auto.
    

    https://bugreports.qt.io/browse/QTBUG-12916

    【讨论】:

      猜你喜欢
      • 2012-03-28
      • 2021-11-17
      • 2018-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-15
      相关资源
      最近更新 更多