把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

软件和网站开发以及相关技术探讨
回复
头像
Allen1st
帖子: 404
注册时间: 2008-11-08 9:28

把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

#1

帖子 Allen1st » 2010-08-31 15:15

安装环境: ubuntu10.04 + eclipse3.5.2 + CDT + qt4 + c/c++编译环境,满足所有这些条件的直接从第4步开始。

1.没有C/C++编译环境的,先装上:

代码: 全选

 sudo apt-get install build-essential g++ gcc-4.3-doc
2.所用eclipse不是for C/C++或者没装CDT的:

在eclipse的HELP菜单-->Install New Software->work with,粘贴下面的地址:

代码: 全选

http://download.eclipse.org/tools/cdt/releases/galileo
然后点"Add",会提示输入名字,就设为CDT好了。然后等update,再然后会出来可用的包列表,勾上所有选项,一路NEXT就是。

3.没装qt4的,安装qt4:

代码: 全选

sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-designer ctags 
4.下载下面两个东西:

qt4的eclipse插件 http://get.qt.nokia.com/qteclipse/qt-ec ... src.tar.gz

qt4帮助文档 http://get.qt.nokia.com/qteclipse/com.t ... _4.6.1.zip

然后解压到/usr/lib/eclipse/plugins中。

完成后,这个文件夹应该有以下子目录:
/usr/lib/eclipse/plugins/com.trolltech.help_4.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner.linux.x86_1.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesignerplugins.linux.x86
/usr/lib/eclipse/plugins/com.trolltech.qtcppintegrationhelp.examples_1.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppproject.linux.x86_1.6.1

以及以下文件:
/usr/lib/eclipse/plugins/com.trolltech.qtcpp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner.qtcpp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppintegrationhelp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppproject_1.6.1.jar

5.命令行下启动一次eclipse

代码: 全选

eclipse -clean
然后在"Window->Preference->qt" 里配置如下信息:

* Name : Qt4
* Bin Path : /usr/bin
* Include Path : /usr/include/qt4

卸载方法:

1.删除插件

代码: 全选

sudo rm -r /usr/lib/eclipse/plugins/com.trolltech.*
2. 重启eclipse

代码: 全选

eclipse -clean

参考资料:

1. Installation Instructions for Linux Systems http://qt.nokia.com/developer/eclipse-i ... ux-systems

2. 用Eclipse开发QT4的C++程序 http://www.cnitblog.com/yunshichen/arch ... _plus.html
上次由 Allen1st 在 2011-01-03 19:20,总共编辑 5 次。
凸-_-
头像
dartagnan1987
帖子: 17
注册时间: 2010-03-31 11:36

Re: 把qt4整合进了eclipse[附安装方法]

#2

帖子 dartagnan1987 » 2010-10-30 11:58

这个要顶一下咯
There is nothing but honor!
millieyao
帖子: 4
注册时间: 2010-11-23 17:05

Re: 把qt4整合进了eclipse[附安装方法]

#3

帖子 millieyao » 2010-11-23 17:42

顶~~ :em11
iceworldfb
帖子: 12
注册时间: 2009-03-31 12:15

Re: 把qt4整合进了eclipse[附安装方法]

#4

帖子 iceworldfb » 2010-11-27 16:16

强烈支持,完美的集成开发环境……
头像
Allen1st
帖子: 404
注册时间: 2008-11-08 9:28

Re: 把qt4整合进eclipse[完整安装方法]Jan.1.2011更新

#5

帖子 Allen1st » 2011-01-03 13:46

再更新一下,改正一些笔误。
凸-_-
头像
xm1380
帖子: 43
注册时间: 2010-02-09 14:42
联系:

Re: 把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

#6

帖子 xm1380 » 2011-01-09 22:29

留名,改天试试~~
一天天,一点点。。。
cjs0722
帖子: 33
注册时间: 2011-03-12 17:13

Re: 把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

#7

帖子 cjs0722 » 2011-03-14 1:33

试试~~谢谢楼主
fp862
帖子: 43
注册时间: 2009-11-07 21:25

Re: 把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

#8

帖子 fp862 » 2011-03-31 23:27

呵呵,Eclipse,强大,不知道这样整合后有没有函数提示之类的,先mark下~
0689
帖子: 17
注册时间: 2009-08-14 19:28

Re: 把qt4整合进eclipse[完整安装方法]Jan.3.2011更新

#9

帖子 0689 » 2011-11-19 21:42

mark 一下
回复