简体   繁体   English

Qt Creator不会加载我的自定义小部件插件

[英]Qt Creator doesn't load my custom widget plugin

My OS is Win7 and I've installed Qt 5.5.0 我的操作系统是Win7,我已经安装了Qt 5.5.0

I create a simple custom widget plugin New Project->Other Project -> Qt Custom Designer Widget 我创建了一个简单的自定义小部件插件New Project-> Other Project-> Qt Custom Designer Widget

after creating the dll , I copy it in D:\\Qt\\Qt5.5.0\\Tools\\QtCreator\\bin\\plugins\\designer and D:\\Qt\\Qt5.5.0\\5.5\\mingw492_32\\plugins\\designer 创建dll之后,我将其复制到D:\\ Qt \\ Qt5.5.0 \\ Tools \\ QtCreator \\ bin \\ plugins \\ designer和D:\\ Qt \\ Qt5.5.0 \\ 5.5 \\ mingw492_32 \\ plugins \\ designer

but in Qt Creator designer does not appear my widget in the widget box 但在Qt Creator设计器中,我的窗口小部件没有出现在窗口小部件框中

but if I run designer .exe, all ok , my widget is displayed 但是如果我运行designer .exe, 一切正常 ,那么会显示我的小部件

i read Qt Designer doesn't load my custom widget plugin and i read How to promote a custom widget in QT Creator 我阅读了Qt Designer不会加载我的自定义小部件插件,并且我阅读了如何在QT Creator中提升自定义小部件

I came to the conclusion that qt creator does not work correctly 我得出的结论是qt创作者无法正常工作

Sorry I do not have enough reputation to comment. 抱歉,我没有足够的声誉来发表评论。 There are many possible reasons, why your plugin does not load. 有许多可能的原因导致您的插件无法加载。 You can look for further information by opening a *.ui file in qt creator and then take a look in the menu: Tools->Form Editor->About QtDesigner Plugins. 您可以通过在qt Creator中打开* .ui文件,然后在菜单中查看以下信息来查找更多信息:工具->表单编辑器->关于QtDesigner插件。

If your plugin is listed there, you copied it in the right folder and you will get a hint why it does not load. 如果您的插件在此处列出,则将其复制到正确的文件夹中,您将得到提示,提示它为什么不加载。 In my experience, the most common mistake is, that your qt-creator was not build with mingw, but you are trying to load a plugin built with mingw. 以我的经验,最常见的错误是您的qt-creator不是使用mingw构建的,但是您正在尝试加载使用mingw构建的插件。 You need to use the same compiler for both. 两者都需要使用相同的编译器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM