- Author: ngohaibac@hocdelam.org
Website: http://www.ngohaibac.net
-
hello.cpp
- #include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
-
Environment variables
-
Windows
-
Mingw
- C:\Qt\2009.04\mingw\bin
-
qmake
- C:\Qt\2009.04\qt\bin
- Linux
-
Compile
-
Create a platform-independent project file
- qmake -project
- hello.c
hello.pro
-
Create Makefile
- qmake hello.pro
- Topic
-
Build program
-
Linux
- make
-
Windows
- mingw32-make
-
Run
- debug/hello.exe
- Topic