how to deal with "no such file error or diretory" error for a new programmer in QT creator「建议收藏」

how to deal with "no such file error or diretory" error for a new programmer in QT creator

大家好,又见面了,我是全栈君。

when i try to develop a hello demo in QT creator with the code following :

#include<QApplication>
#include<QLabel>
int main(int argc,char *argv[])
{

    QApplication app(argc,argv);
    QLabel l(“hello,word!”);
    l.show();
    return app.exec();
}

the IDE inform me that “QApplication no such file or directory”, then i search the Internet, and find that i should add the following code in “*.pro”:

QT       += core gui widgets

or add the following:

QT       += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

these code tell the qmake to include the header.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/108406.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 冈萨雷斯《数字图像处理》第3版课后习题[通俗易懂]

    冈萨雷斯《数字图像处理》第3版课后习题[通俗易懂]第3章3.6原题:试解释为什么离散直方图均衡技术一般不能得到平坦的直方图?答:假设有一副图像,共有像素个数为n=MN(M行N列),像素灰度值取值范围为(0~255),那么该图像的灰度值的个数为L

    2022年8月2日
    10
  • Pytorch(五)入门:DataLoader 和 Dataset

    Pytorch(五)入门:DataLoader 和 DatasetDataLoader和Dataset构建模型的基本方法,我们了解了。接下来,我们就要弄明白怎么对数据进行预处理,然后加载数据,我们以前手动加载数据的方式,在数据量小的时候,并没有太大问题,但是到了大数据量,我们需要使用shuffle,分割成mini-batch等操作的时候,我们可以使用PyTorch的API快速地完成这些操作。Dataset是一个包装类,用来将数据包装为Datas…

    2022年6月14日
    29
  • Windows内核开发-3-内核编程基础

    Windows内核开发-3-内核编程基础Windows内核开发-3-内核编程基础这里会深入讲解kernel内核的API、结构体、和一些定义。考察代码在内核驱动中运行的机制。最后把所有知识合在一起写一个有用的驱动。本章学习要点:1:通用

    2022年7月3日
    28
  • Mongodb语法总结

    Mongodb语法总结

    2022年1月9日
    40
  • Pytest(1)安装与入门[通俗易懂]

    Pytest(1)安装与入门[通俗易懂]pytest介绍pytest是python的一种单元测试框架,与python自带的unittest测试框架类似,但是比unittest框架使用起来更简洁,效率更高。根据pytest的官方网站介绍,它

    2022年7月30日
    4
  • Android文件系统的结构及目录用途、操作方法 整理「建议收藏」

    Android文件系统的结构及目录用途、操作方法 整理「建议收藏」1、android文件系统的结构android源码编译后得到system.img,ramdisk.img,userdata.img映像文件。其中,ramdisk.img是emulator的文件系统,system.img包括了主要的包、库等文件,userdata.img包括了一些用户数据,emulator加载这3个映像文件后,会把system和userdata分别加载到ram

    2022年10月15日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号