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
阅读(2093) | 评论(0) | 转发(0) |