In QT5, when I use this: #include<QApplication>, QT tells :no such file or directory, even though it is all right for previous version of QT.

It turns out these files QApplication and so on have been moved to other places.

How to correct?

#include <QApplication> --------------------> #include <QWidgets/QApplication>

#include <QDialog> --------------------> #include <QWidgets/QDialog>

#include <QLabel> --------------------> #include <QWidgets/QLabel>

.....................blabla

when I do this, still there are some errors, I dunno...........

another way is to change the .pro file, make it adapt to qt4.

In QT gui, the application is necessary for a program, it is used for managing the program application resources.

QT5: QApplication, no such file or directory的更多相关文章

  1. QT5.1在Windows下 出现QApplication: No such file or directory 问题的解决办法

    QT5.0.1在Windows下 出现QApplication: No such file or directory 问题的解决办法 分类: 编程语言学习 软件使用 QT编程学习2013-03-07 ...

  2. QT5.0.1在Windows下 出现QApplication: No such file or directory 问题的解决办法

    第一个Qt 程序 环境window ,ide qt creator 新建一个 C++ 项目 > 新建一个main.cpp 输入如下代码 #include<QApplication> ...

  3. error: QApplication: No such file or directory

    尝试用Qt5编译Qt4的工程.你会遇到下面的问题: 错误:C1083: 无法打开包括文件:“QApplication”: No such file or directory 出现原因:Qt5里不再用Q ...

  4. <QT障碍之路>QApplication:No such file or directory

    原因:QT5将很多部件都移动了QT widgets模块中. 解决方法: 在.pro文件中添加 greaterThan(QT_MAJOR_VERSION, ): QT += widgets

  5. Qt 5 在Windows下 出现QApplication: No such file or directory 问题的解决办法

    解决方法是:在*.pro工程项目文件中添加一行QT += widgets,然后再编译运行就OK了.

  6. Qt5编译项目出现GL/gl.h:No such file or directory错误

    编译在Ubuntu12.04下安装了Qt5.1.1,在编译工程的时候出现了如下错误:“GL/gl.h:No such file or directory”,查了一下资料发现这个问题由于系统中没有安装O ...

  7. Visual Studio 2017 无法打开包括文件: “QOpenGLWidget”: No such file or directory

    编译项目时,发现报错:VS 无法打开包括文件: “QOpenGLWidget”: No such file or directory,在Qt对应的目录(E:\Qt\Qt5.12.2\5.12.2\ms ...

  8. qt下qmake:提示could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

    编译出现的问题解决方法: 打开终端输入,qmake -v,出现错误:qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': N ...

  9. Arm Qt编译Qt例程出错 GLES3/gl3.h: No such file or directory 解决方法

    工作环境 PC:Ubuntu18.04QtCreator: 4.8.2交叉编译环境:野火imxull6开发板提供的 5-编译工具链->qt交叉编译工具 在之前博客配置成功的交叉编译环境,编译Qt ...

随机推荐

  1. MIME协议

    转:http://blog.csdn.net/flfna/article/details/5048290 MIME类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候 ...

  2. POJ 2411.Mondriaan's Dream 解题报告

    题意: 给出n*m (1≤n.m≤11)的方格棋盘,用1*2的长方形骨牌不重叠地覆盖这个棋盘,求覆盖满的方案数. Solution:                位运算+状态压缩+dp       ...

  3. 【COGS1672】难存的情缘

    [题目描述] 一天机房的夜晚,无数人在MC里奋斗着... 大家都知道矿产对于MC来说是多么的重要,但由于矿越挖越少,勇士们不得不跑到更远的地方挖矿,但这样路途上就会花费相当大的时间,导致挖矿效率底下. ...

  4. Mysql 应该选择什么引擎

    对于如何选择存储引擎,可以简答的归纳为一句话:“除非需要用到某些INNODB 不具备的特性,并且没有其他办法可以替代,否则都应该选择INNODB 引擎”.例如:如果要用到全文索引,建议优先考虑INNO ...

  5. ORACLE数据库多表关联查询效率问题解决方案

    最近在做项目中遇到多表关联查询排序的效率问题(5张以上40W+数据的表),查询一次大概要20多秒,经过一番苦思冥想,处理方案如下: 1.软件设计初期,需要一对一关联的表应该设计在一张大表里,这样虽然字 ...

  6. java-二分查找法

    package search; public class BinarySearch { public static void main(String[] args) { , , , , , , , , ...

  7. CentOS安装rar、unrar解压缩软件的方法

    闲话不说,centos上如何安装rar.unrar在线解压缩软件呢?如果您的centos是32位的,执行如下命令: wget http://www.rarsoft.com/rar/rarlinux-3 ...

  8. Delphi-LowerCase 函数

    函数名称 LowerCase 所在单元 System.SysUtils 函数原型 function LowerCase(const S: string): string; 函数功能 将字符串中所有的大 ...

  9. C# RGB与16进制颜色转换方法

    http://www.cnblogs.com/goldarch/archive/2010/08/16/1801053.html #region [颜色:16进制转成RGB]        /// &l ...

  10. nutch Fetcer阶段详解

    job.setSpeculativeExecution(false); 抓网页阶段,不允许同一个任务运行多次,否则,网页就抓重了 为了充分利用闲置资源,加快map 和 reduce 的执行,于是有Sp ...