天天看點

QT與vs2005內建

1.下載下傳qt-win-commercial-src-4.3.1.zip http://qt.tttxp.ru/4.3.1/qt-win-commercial-src-4.3.1.zip

2.下載下傳qt-vsintegration-1.3.1.exe http://qt.tttxp.ru/4.3.1/qt-vsintegration-1.3.1.exe (注冊碼: LicenseID="4444" Licensee="StarDancer" LicenseKeyExt=FGKX-RM5-F4M-2CX-3P5X-HGM8X-2B52 下載下傳總頁面:http://qt.tttxp.ru/HTML/4xx.htm 非開源版本的在這裡下載下傳)

3.我的電腦上右鍵->屬性->進階->環境變量 在環境變量path中添加;D:/qt/bin (;是用來和其它環境變量分開的) 建立環境變量:QMAKESPEC值win32-msvc.net

4.解壓qt-win-commercial-src-4.3.1.zip到d:/qt

5.檢查d盤空間 ntfs下占用空間為949 MB (995,687,822 位元組) , 帶檔案壓縮的情況下 fat32下大小為1.96 GB (2,108,853,199 位元組) , 實際占用空間會更多 另外考慮到盤上需要留一定的空間出來,

6.把d:/qt下的.LICENSE檔案複制到系統盤的使用者目錄下 如C:/Documents and Settings/Administrator

7.開始->所有程式->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 指令提示 輸入下面指令 d: cd qt configure (可以隻選擇一部分的configure -help可以看到選項) y (y了以後得等好一段時間了,可能有幾十分鐘.....可以去玩) nmake (哇哈哈,先去吃飯...會等很久的,可能是1個半小時,當然可以不選擇完全編譯的)

8.運作qt-vsintegration-1.3.1.exe一路next直到安裝成功

9.運作vs2005->工具(tools)->選項(options)->qt->builds->add->4.3.1 d:/qt

10.建立項目,選擇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!

繼續閱讀