我试图在Windows上部署我的Qt 5.1应用程序,但在使用Qt Quick Controls组件运行窗口时出错。窗口没有显示,它看起来像白色矩形。
我的捆绑包结构:
- 图像格式
- qgif.dll
- qico.dll
- 平台
- qminimal.dll
- qwindows.dll
- QtQuick
- QtQuick。2
- QtWebkit
- icudt51.dll
- icuin51.dll
- icuuc51.dll
- libeay32.dll
- libgcc_s_dw2-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll
- Qt5Guid.dll
- Qt5Network.dll
- Qt5OpenGL.dll
- Qt5PrintSupport.dll
- Qt5Qml.dll
- Qt5Quick.dll
- Qt5Sensors.dll
- Qt5Sql.dll
- Qt5V8.dll
- Qt5WebKit.dll
- Qt5WebKitWidgets.dll
- Qt5Widgets.dll
- Qt5Xml.dll
- Qt5XmlPatterns.dll
- MyApp.exe
- ssley32.dll
QtQuick、QtQuick.2和QtWebkit是来自\Qt5.1.0\5.1.0\mingw48_32\qml\的文件夹
错误:
qrc:/qml/resources/qml/SettingsDialog.qml:775:21: Type RadioButton unavailable
file://%myApp%/QtQuick/Controls/RadioButton.qml:80:1: Type AbstractCheckable unavailable
AbstractCheckable {
^
file://%myApp%/QtQuick/Controls/Private/AbstractCheckable.qml:61:1: Control is not a type
Control {
问题发生在捆绑包的位置:它是从VMWare虚拟机中的网络驱动器启动的。我把它移到本地驱动器上,它就工作了。
这是一个QT错误,我找到的唯一解决方案是在AbstractCheckable.qml
中添加import QtQuick.Controls.Private 1.0