分页: 1 / 1

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

发表于 : 2010-08-31 15:15
Allen1st
安装环境: 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

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

发表于 : 2010-10-30 11:58
dartagnan1987
这个要顶一下咯

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

发表于 : 2010-11-23 17:42
millieyao
顶~~ :em11

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

发表于 : 2010-11-27 16:16
iceworldfb
强烈支持,完美的集成开发环境……

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

发表于 : 2011-01-03 13:46
Allen1st
再更新一下,改正一些笔误。

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

发表于 : 2011-01-09 22:29
xm1380
留名,改天试试~~

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

发表于 : 2011-03-14 1:33
cjs0722
试试~~谢谢楼主

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

发表于 : 2011-03-31 23:27
fp862
呵呵,Eclipse,强大,不知道这样整合后有没有函数提示之类的,先mark下~

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

发表于 : 2011-11-19 21:42
0689
mark 一下