本来一直用开源版的,配合mingw也不错,该死的xp崩溃了,重装mingw觉得比较麻烦,正好手上的vs2003光盘一直没用过,就装了个vs2003,既然vs是d版,干脆使用d版的qt好了.我哭,兴致冲冲的打开传说中qt.tttxp.ru显示Site was closed according to request of Trolltech ASA company.好后悔当初没down下来~~
不过这世界上还有google,在一个国外网站上找到了种子。我需要qt-win-commercial-src-4.3.1.zip,qt-vsintegration-1.3.1.exe,还有一个license.txt文件.下载完后,进入vc的控制台环境,编译源代码才能用,照着附带的readme做就是了。安装qt-vsintegration,他是VC的插件,装上后就能创建QT的VC项目,比用一般的编辑器来写QT程序要方便许多。还要记得把把 license.txt 存成 .qt-license :
命令行下copy license.txt .qt-license
ok,最后虚伪的说一句,支持Qt,商业应用请购买正版,现在qt归诺基亚了,不知道前途如何!
这里还是把步骤及下来:
1.我的电脑上右键->属性->高级->环境变量
在环境变量path中添加;D:\qt\bin (;是用来和其它环境变量分开的)
新建环境变量:QMAKESPEC值win32-msvc.net
2.解压qt-win-commercial-src-4.3.1.zip到d:\qt
3.检查d盘空间
ntfs下占用空间为949 MB (995,687,822 字节) , 带文件压缩的情况下
fat32下大小为1.96 GB (2,108,853,199 字节) , 实际占用空间会更多
另外考虑到盘上需要留一定的空间出来,
4.把d:\qt下的.LICENSE文件复制到系统盘的用户目录下
如C:\Documents and Settings\Administrator
5.开始->所有程序->Microsoft Visual Studio 2003->Visual Studio .NET 2003 Command Prompt 命令提示
输入下面命令
d:
cd qt
configure (可以只选择一部分的configure -help可以看到选项)
y
(可以喝好几杯茶了)
nmake
(如果机器慢,建议先睡一觉)
6.运行qt-vsintegration-1.3.1.exe一路next直到安装成功
7.运行vs2003->工具(tools)->选项(options)->qt->builds->add->4.3.1 d:\qt
8.新建项目,选择qt的.....ctrl+f5就可以了
安装说明原文:
INSTALLING Qt/Windows Version 4.3.1
Note: If you have obtained a binary package for this platform, consult the
installation instructions provided instead of the ones in this document.
1. If you have the commercial edition of Qt, copy the license file
from your account on dist.trolltech.com into your home directory
(this may be known as the userprofile environment variable) and
rename it to .qt-license. For example on Windows 2000,
%USERPROFILE% should be something like C:\Documents and
Settings\username
For the open source version you do not need a license file.
2. Uncompress the files into the directory you want Qt installed,
e.g. C:\Qt\4.3.1.
NOTE: The install path must not contain any spaces.
3. Environment variables
In order to build and use Qt, the PATH environment variable needs
to be extended:
PATH - to locate qmake, moc and other Qt tools
This is done by adding c:\Qt\4.3.1\bin to the PATH variable.
For newer versions of Windows, PATH can be extended through
"Control Panel->System->Advanced->Environment variables" and for
older versions by editing c:\autoexec.bat.
4. Building
To configure the Qt library for your machine type:
C:
cd \Qt\4.3.1
configure
Type "configure -help" to get a list of all available options.
If you are using the "-direct3d" option, make sure that you have
the Direct3D SDK installed, and that you have run the
%DXSDK_DIR%\Utilities\Bin\dx_setenv.cmd command, before attempting
to run configure.
The actual commands needed to build Qt depends on your development
system. For Microsoft Visual Studio to create the library and
compile all the demos, examples, tools and tutorials type:
nmake
If you need to reconfigure and rebuild Qt from the same location,
ensure that all traces of the previous configuration are removed
by entering the build directory and typing
nmake confclean
before running the configure script again.
5. That's all. Qt is now installed.
If you are new to Qt, we suggest that you take a look at the demos
and examples to see Qt in action. Run the Qt Examples and Demos
either by typing 'qtdemo' on the command line or through the
desktop's Start menu.
You might also want to try the following links:
http://doc.trolltech.com/4.2/how-to-learn-qt.html
http://doc.trolltech.com/4.2/tutorial.html
http://www.trolltech.com/developer
We hope you will enjoy using Qt. Good luck
评论