首页 > 解决方案 > 如何在调试中创建 qmltypes 文件

问题描述

我在调试模式下构建了一个扩展插件当我尝试运行 qmlplugindump 我得到

QQmlComponent: Component is not ready
file:///C:/Qt/Examples/Qt-5.12.0/qml/qmlextensionplugins/imports/typelist.qml:3:1: plugin cannot be loaded for module "TimeExample": The plugin 'C:/Qt/Examples/Qt-5.12.0/qml/qmlextensionplugins/imports/TimeExample/qmlqtimeexampleplugin.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)

如何在调试扩展上运行 qmlplugindump?

谢谢

标签: qmlqt5

解决方案


如果您只想使用调试库,请在 release 中创建库并生成 plugins.qmltypes。然后将它与调试库一起使用。这在我的环境中有效。


推荐阅读