environment:
OS: Ubuntu Linux 9.04
Qt SDK 4.5, command line only.
Create a source code, hello.cpp, with the following content. And save in folder "hello".
#include <QApplication>
#include <QtGui>
int main(intargc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello World Qt!");
label->show();
return app.exec();
}
hello.cpp
Start Terminal, change to the folder "hello".
Type the following command:
qmake -project
qmake hello.pro
make
Run by the command:
./hello