1. Author: ngohaibac@hocdelam.org Website: http://www.ngohaibac.net
  2. hello.cpp
    1. #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(); }
  3. Environment variables
    1. Windows
      1. Mingw
        1. C:\Qt\2009.04\mingw\bin
      2. qmake
        1. C:\Qt\2009.04\qt\bin
    2. Linux
  4. Compile
    1. Create a platform-independent project file
      1. qmake -project
      2. hello.c hello.pro
    2. Create Makefile
      1. qmake hello.pro
      2. Topic
    3. Build program
      1. Linux
        1. make
      2. Windows
        1. mingw32-make
  5. Run
    1. debug/hello.exe
    2. Topic