Qt Designer中加载第三方插件Qwt
需要在Qt中绘制图表,查找资料有一个开源库QWT,下载地址点击打开链接,其中qwtdesigner-6.1.0-qt4.8-windows-msvc2010_32-x86是编译好的.lib和.dll文件,按照http://www.cppblog.com/cc/archive/2008/09/05/60987.html操作,将他们拷贝到$(QTDIR)\plugins\designer中,重新启动QtDesigner,就可以。但是没有成功。
查看插件是否加载成功:工具->Form Editor->About Qt Designer Plugins ..
我的库是Qt5.3.1,查看帮助文档Deloying Plugins:http://qt-project.org/doc/qt-5/deployment-plugins.html,
发现1、低版本的Qt库不能加载高版本编译的插件,比如Qt 5.0.0 will not load a plugin built with Qt 5.0.1.
2、高版本的库不能加载更低主版本号编译的插件,比如Qt 5.0.1 will not load a plugin built with Qt 4.8.2.
而:Qt 5.1.1 will load plugins built with Qt 5.1.0 and Qt 5.0.3。
查看qwtdesigner-6.1.0-qt4.8-windows-msvc2010_32-x86中的readme文件发现
This package contains a Qwt designer plugin that has been built for Qt 4.8 with 32 bit MSVC compiler. It is compatible with the official binary packages of the Qt Creator 2.7.x ( also included in the Qt packages for MinGW ! ).
该Qwt插件是Qt4.8编译的库。