1. Ubuntu下安装Qt集成环境
sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designer
2. 编写一个简单的Qt程序
生成一个简单的窗口
3. 生成一个与平台无关的项目文件
www.linuxidc.com@ubuntu:~/MyTrain/Qt/Basic/hello$ qmake -project
4. 生成makefile文件
www.linuxidc.com@ubuntu:~/MyTrain/Qt/Basic/hello$ qmake hello.pro
5. 生成目标文件
www.linuxidc.com@ubuntu:~/MyTrain/Qt/Basic/hello$ make
6. 执行目标文件
www.linuxidc.com@ubuntu:~/MyTrain/Qt/Basic/hello$ ./hello
7. 运行结果