[英]qt creator : no such a file or directory
嗨,我只是想在 qt 中編譯一個簡單的項目
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton bouton("Salut les Zéros, la forme ?");
bouton.show();
return app.exec();
}
但我有這個錯誤:/home/eid/test/easyprojet/main.cpp:1: error: QApplication: No such file or directory
誰能幫我 ?
對不起我的英語
在 Qt5 中,它駐留在 .
在 Qt5 中,您需要將QT += widgets
添加到您的 .pro 文件中。
也可能是因為該項目不在QT creator 的工作區中。 它發生在我身上。 因此,嘗試將項目放在工作區中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.