Chinaunix首页 | 论坛 | 博客
  • 博客访问: 301242
  • 博文数量: 63
  • 博客积分: 1482
  • 博客等级: 上尉
  • 技术积分: 1185
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-12 19:06
个人简介

hello world!

文章分类

全部博文(63)

分类: C/C++

2013-09-08 00:59:35

Qwt插件增加至designer

1、 系统环境

Windows 7 x86操作系统(32bit);

Intel(R) Core(TM) i5-3470 CPU;

2、软件包

       Qwt 6.0.0()

       Qt Creator 2.4.1;

Qt 4.8.1 for Desktop MSVC2008 (用于QtMicroSoft工具)

Microsoft Visual C++Compiler 9.0(x86)

3、安装

3.1 解压

       解压Qwt 5.0.2,通过Qt creator打开工程文件,在管理工程目录下将qwtconfig.pri文件(这里所做的修改主要是为了能够调试qwt程序):将

else {

# Qt 4

win32 {

# On Windows you can't mix release and debug libraries.

# The designer is built in release mode. If you like to use it

# you need a release version. For your own application development you

# might need a debug version.

# Enable debug_and_release + build_all if you want to build both.

 

CONFIG           += release     # release/debug/debug_and_release

#CONFIG           += debug_and_release

#CONFIG           += build_all

}

else {

CONFIG           += release     # release/debug

}

}

修改成为

else {

# Qt 4

win32 {

# On Windows you can't mix release and debug libraries.

# The designer is built in release mode. If you like to use it

# you need a release version. For your own application development you

# might need a debug version.

# Enable debug_and_release + build_all if you want to build both.

 

#CONFIG           += release     # release/debug/debug_and_release

#CONFIG           += debug_and_release

CONFIG           += build_all

}

else {

CONFIG           += release     # release/debug

}

}

3.2 项目配置

       在打开的Qwt工程中选择项目->Qt版本->管理->选择Qt 4.8.1 for Desktop MSVC2008工具;工具中选择Microsoft Visual C++ Compiler 9.0 (x86)

clip_image002

clip_image004

       编译完成后,将源目录下的plugin插件文件下的qwt_designer_plugin.dll 文件拷贝到QtSDK的安装目录D:\QtSDK\QtCreator\bin\designer下。

clip_image006

       qwt目录下的qwt.dllqwt.libqwtd.dllqwtd.lib放至D:\QtSDK\QtCreator\bin目录下。

clip_image008

       重启动Qt Creator,建立一个新的带UI界面的工程,并进入UI设计器点击工具->界面编辑器->关于QT设计师插件。如果正常的话,会是此处Qt将显示找到的插件。

clip_image010

       接下来我们就可以直接拖选qwt的控件使用了。当然,如果要编译成exe还需要在.pro文件中将QWT库的头文件和LIBS动态库增加到文件中。

clip_image012

阅读(4716) | 评论(0) | 转发(0) |
0

上一篇:Qt 简便日志系统

下一篇:STL标准模板库

给主人留下些什么吧!~~