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 gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

qmake hello.pro

 生成了Makefile

make

 

相关文章:

  • 2021-12-22
  • 2021-06-03
  • 2021-10-11
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-12-26
猜你喜欢
  • 2021-08-02
  • 2022-12-23
  • 2021-04-19
  • 2021-10-16
  • 2022-12-23
  • 2021-12-22
  • 2021-10-01
相关资源
相似解决方案