mkdir hello
helloworld.cpp
#include <QPushButton>
#include <QApplication>
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QPushButton btn("hello world");
    btn.resize(200,100);
    btn.show();
    return app.exec();
}qmake –project
生成的是hello.pro
编辑QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsqmake hello.pro生成了Makefile
make









