1

最终目标是从 Qt Creator 中运行基于 Qt5.6 的应用程序。我发现有一个工具C:\Qt\5.6\mingw49_32\bin\windeployqt.exe。所以我执行如下:

C:\Qt\5.6\mingw49_32\bin>windeployqt.exe PATH_TO_MY_EXE_FOLDER --release -3dcore -quick -qml -3dquick -3dinput

然后我启动我的应用程序并看到它module QtQuick/QtQuick.Scene3D is not installed。为了解决这个问题,我将整个 qml 文件夹复制C:\Qt\5.6\mingw49_32\qml到我的应用所在的文件夹中。

我在屏幕上看到以下内容:

qrc:/main.qml:2:1:无法为模块“QtQuick.Scene3D”加载插件:无法加载库 C:\gui\qml\QtQuick\Scene3D\qtqui ckscene3dplugin.dll:?? ?????????????????????”

我应该怎么办?实际上,qtquickscene3dplugin.dll在正确的文件夹中。

部署基于 Qt5.6 的应用程序的最佳/最简单方法是什么?

4

1 回答 1

1

After half a day of non-stop experiments here is a solution : 1. Copy all *.dlls from C:\Qt\5.6\mingw49_32\bin to your bin folder 2. Copy qml and plugin folders from C:\Qt\5.6\mingw49_32 to your bin folder 3. Create qt.conf in your bin folder with the following content :

[Paths]
Prefix=.
Plugins=plugins
Qml2Imports=qml

After all these steps you will be able to start your application from Windows Explorer. And don't ask me how copying all the DLLs could influence on plugin loading issue :)

于 2016-04-06T16:27:32.790 回答