Windows 下 QT 开发环境的搭建

时间:2021-04-27 03:41:18

Qt 4.x Open Source (MinGW) for Windows安装

这里是指直接在Windows 2000/XP上安装Trolltech预编译好的Qt 4.x for Windows版本。这个版本使用了开源的MinGW编译器。因为很多在Windows上的朋友早已经习惯了Visual C++或者Borland C++ Builder这样的IDE,所以这里给大家推荐的是Dev-C++,Windows上的开源IDE,希望对大家能有所帮助。

下载

Dev-C++
http://prdownloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe?download
ftp://ftp.qtopia.org.cn/mirror/dev-cpp.sourceforge.net/devcpp-4.9.9.2_setup.exe
http://www.qtopia.org.cn/ftp/mirror/dev-cpp.sourceforge.net/devcpp-4.9.9.2_setup.exe

Qt 4.x Open Source (MinGW) for Windows
ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.1.1-mingw.exe
ftp://ftp.qtopia.org.cn/mirror/ftp.trolltech.com/qt/source/qt-win-opensource-4.1.1-mingw.exe
http://www.qtopia.org.cn/ftp/mirror/ftp.trolltech.com/qt/source/qt-win-opensource-4.1.1-mingw.exe

安装

先安装Dev-C++,在Choose Components的时候,记得要保证Mingw compiler system被选中,默认是选中的。

然后安装Qt 4.x,在MinGW Installation的时候,请保证Download and install minimal MinGW installation.不要被选中,默认是不选中的。另外在Previously installed MinGW:一项中填入上一步中Dev-C++安装的位置,默认位置为C:/Dev-Cpp。在Configure Enviroment的时候,Set environment variables要选中,默认是选中的。

然后就都安装完毕了。

想看看Qt 4.x的demo么?
运行一下C:/Qt/4.1.1/bin/qtdemo.exe
看到了么?
这些都是Qt!