mingm97 2022-03-10 14:49 采纳率: 11.1%
浏览 43
已结题

代码移植后,qml提示缺少模块

问题遇到的现象和发生背景

环境 ubuntu14.4 qt5.12.2

问题相关代码,请勿粘贴截图
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("viewCtl", new ViewCtl);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
运行结果及报错内容

QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" plugin "qtquick2plugin" not found

我的解答思路和尝试过的方法

源代码在windows端运行无问题,在linux端提示如上错误,是否需要对系统进行某些配置

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 3月18日
    • 创建了问题 3月10日