Originally posted by Bucic
View Post
compare:
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); }
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); }
mkdir qt-example && cd qt-example/ cat > main.cpp #include <QTextStream> int main(int, char**) { QTextStream out(stdout); out << "Hello World\n"; return 0; } qmake -project qmake make
g++ main.cpp -o hello `pkg-config --libs --cflags QtCore`
Comment