网上找了很多资料,有几个地方没注意,弄了一个上午才搭建好。。。
<!--[if !supportLists]-->1, <!--[endif]-->安装Dev C++到D:/Dev-Cpp目录下
<!--[if !supportLists]-->2, <!--[endif]-->从官网上下载qt-win-opensource-<chsdate year="1899" month="12" day="30" islunardate="False" isrocdate="False" w:st="on">4.2.3</chsdate>-mingw.exe,安装到 D:/Qt目录下,注意这一步的选择:

3,“开始”—“所有程序”—“Qt<chsdate year="1899" month="12" day="30" islunardate="False" isrocdate="False" w:st="on">4.2.3</chsdate>” —“Build Debug Libraries”或者进入D:/Qt/bin下找到qtvars.bat,开始安装(时间比较长,请耐心等待)。
4,设置环境变量:
<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->lib:D:/Qt/lib
Path:D:/Qt/bin;D:/Dev-Cpp/bin;D:/Dev-Cpp/mingw32/bin;
QMAKESPEC:win32-g++
Path:D:/Qt/bin;D:/Dev-Cpp/bin;D:/Dev-Cpp/mingw32/bin;
QMAKESPEC:win32-g++
5,编写测试程序Hello.cpp:
<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->#include<QApplication>
#include<QPushButton>
intmain(intargc,char*argv[])
{
QApplicationapp(argc,argv);
QPushButtonhello("Helloworld!!!");
hello.resize(100,30);
hello.show();
returnapp.exec();
}
#include<QPushButton>
intmain(intargc,char*argv[])
{
QApplicationapp(argc,argv);
QPushButtonhello("Helloworld!!!");
hello.resize(100,30);
hello.show();
returnapp.exec();
}
6,打开Qtd的命令行窗口 进入程序所在目录下,
>qmake -project
>qmake
>make
目录下就会编译出可执行文件,运行即可。

1434

被折叠的 条评论
为什么被折叠?



