gpt4 book ai didi

c++ - Qt程序出错

转载 作者:行者123 更新时间:2023-11-30 04:19:19 26 4
gpt4 key购买 nike

这段代码

#include <QtWidgets/QApplication>
#include <QLabel>

int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QLabel *label = new QLabel("my first app");
label->show();
return app.exec();
}

导致错误:

QLabel: there is no such directory

我在 Windows 中使用 Qt 5.0.1

最佳答案

改变

#include <QLabel>

#include <QtWidgets/QLabel>这是QLabel的地方实际驻留(如果这是你想要的 QLabel)

关于c++ - Qt程序出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15930125/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com