The first gui program by Qt

#include<QApplication>
#include<QPushButton>
int main(int argc, char **argv)
{
    QApplication app(argc,argv);
        QPushButton * button =new QPushButton;
        button->setText("hello Qt");
        button->show();
    return app.exec();
}

Step:

qmake –project

qmake

mingw32-make

cd debug

hello.exe

image

原文地址:https://www.cnblogs.com/lzh-Linux/p/3490396.html