QML模块未安装错误:在嵌入式Linux

时间:2015-06-13 02:19:32

标签: c++ linux qt

我正在尝试在某个TI主板上启动交叉编译的GUI Qt应用程序。 我使用此命令启动应用程序:

QT_DEBUG_PLUGINS=1 QT_PLUGIN_PATH=/root/qt-5.2.1-install/plugins LD_LIBRARY_PATH=/root/qt-5.2.1-install/lib/ ./simple_qml_ui -platform linuxfb

不幸的是发生错误:

QFactoryLoader::QFactoryLoader() checking directory path "/root/qt_app/styles" ... 
QFactoryLoader::QFactoryLoader() checking directory path "/root/qt-5.2.1-install/plugins/styles" ... 
QQmlApplicationEngine failed to load component 
qrc:/main.qml:3 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/main.qml:4 module "QtQuick.Dialogs" is not installed
qrc:/main.qml:3 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/main.qml:4 module "QtQuick.Dialogs" is not installed
qrc:/main.qml:3 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/main.qml:4 module "QtQuick.Dialogs" is not installed
qrc:/main.qml:3 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/main.qml:4 module "QtQuick.Dialogs" is not installed

我错过了一些重要的部署步骤吗?我该如何解决这个问题?

2 个答案:

答案 0 :(得分:3)

这个答案与主题创作者平台不符,但我最近在Windows下遇到了同样的错误并发现了这个问题。

因此对于在Windows下遇到此问题的其他人,有以下解决方案:

.\windeployqt.exe <project-path> --release --qmldir <qml-dir> 

qml-dir示例:C:\ Qt \ 5.11.0 \ mingw53_32 \ qml

在我的情况下,我不得不从\ bin文件夹中另外复制以下dll:

libgcc_s_dw2-1.dll, libstdc++-6.dll, libwinpthread-1.dll

答案 1 :(得分:0)

事实证明,您只需要将Qt安装文件夹中的plugins目录复制到您的app文件夹。