• 5041阅读
  • 0回复

Qt + MinGW + Qtclipse + Eclipse [复制链接]

上一主题 下一主题
离线musttieying
 

只看楼主 倒序阅读 楼主  发表于: 2007-09-25
— 本帖被 XChinux 执行加亮操作(2007-09-25) —
转自:http://hi.baidu.com/billyboy/blog/item/819bc0fc28386afcfd037fe5.html


http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/wiki/index.php/Main_Page

推荐:http://hi.baidu.com/chenjsa/blog/item/6db9c9fc0367fcfffd037f33.html

1. 先装好MinGW,安装路径符合DOS的8.3规则

2. 到 http://www.trolltech.com/developer/downloads/qt/windows 下Qt,建议下exe,zip编译时间太长。

3. 安装Qt的路径也要符合DOS的8.3规则,安装过程中有可能找不到MinGW的某个h文件,不要紧,跳过继续安装。

4. 把${MinGW}/bin和${Qt}/bin加到系统路径里

5. DOS下进入${Qt}/bin,执行qtvars compile_debug,按指示完成配置,然后在同样目录里执行mingw32-make. 需要超过一个小时。至少我的机子花了四个小时。

6. 配置好CDT(细节看过贴)。记得把Project->Build Automatically关了

7. 配置Qtclipse http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/wiki/index.php/Main_Page#QtClipse_Configuration
设置qmake路径,在${qt}/bin里.
the environment variable QMAKEFEATURES (不知道就空着).
the environment variable QMAKESPEC (用windows的就挑${qt}\mkspecs\win32-g++)
8. 试用    http://artis.imag.fr/Membres/Xavier.Decoret/resources/qt/eclipse/wiki/index.php/Main_Page#Basic_usage


Basic usage
Create a new CDT > Standard make project. Right click on the project in the explorer, and select New > File. Name it name_of_project.pro. Open it and edit it so it looks like this:

TEMPLATE = appSOURCES  = main.cpp
You should see it syntax highlighted. Then repeat the process to create a main.cpp file that looks like:

#include <QApplication>#include <QPushButton> int main(int argc,char **argv){ QApplication application(argc,argv); QPushButton button("Hello"); button.show(); QObject::connect(&button,SIGNAL(clicked()),&application,SLOT(quit()));  return application.exec();}

国外qt开源列表:http://freshmeat.net/browse/871/
国内qt开源列表:http://www.qtopia.org.cn/phpBB2/viewforum.php?f=28
快速回复
限100 字节
 
上一个 下一个