Chinaunix首页 | 论坛 | 博客
  • 博客访问: 920886
  • 博文数量: 194
  • 博客积分: 7991
  • 博客等级: 少将
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-09 22:03
文章分类

全部博文(194)

文章存档

2010年(8)

2009年(71)

2008年(109)

2007年(6)

我的朋友

分类: LINUX

2008-07-25 12:41:16

Qt is a great GUI library, "write once, compile anywhere" is Qt's philosophy. If you want your application run's between various OS, then Qt is your best choice.Here is some easy steps to build a Qt application:
 
[1] Hello World!
//hello.cpp
#include
#include
int main(int argc, char *argv[]){
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();
    return app.exec();
}
 
[2] produce project file "hello.pro"
# qmake -project
This will generate platform independent project file.
 
[3] produce platform-specific makefile
# qmake hello.pro
This will generate platform-specific makefiles, with both debug and release versions.
 
[4] build
# make
 
[5] run
# ./hello
 
阅读(2098) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~