我是新來的Qt,在HELLO.CPP寫一個基本樣品:爲什麼qmake -project知道hello.cpp有主要功能?
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello!World! Orz...");
label->setWindowTitle("First Qt!");
label->resize(200, 50);
label->show();
return app.exec();
}
然後我做qmake -project
和qmake
和make
然後./GUI
。它只是運行!
我很困惑。爲什麼qmake知道make hello.cpp
我從來沒有告訴過它!
感謝您的任何答案。