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.

how to deal with &quot;no such file error or diretory&quot; error for a new programmer in QT creator的更多相关文章

  1. Qt Creator编译时:cannot open file 'debug\QtGuiEx.exe' File not found

    Qt Creator编译时:cannot open file 'debug\QtGuiEx.exe' File not found 利用Qt Creator编译工程时,出现如题目所示的错误,其中红色部 ...

  2. Transaction check error: file /etc/rpm/macros.ghc-srpm from install of redhat-rpm-config-9.1.0-80.el7.centos.noarch conflicts with file from package epel-release-6-8.noarch Error Summary ----------

    ./certbot-auto certonly 报错: Transaction check error:   file /etc/rpm/macros.ghc-srpm from install of ...

  3. mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code

    因为之前在Ubuntu下使用的是qtcreator开发,现在想在mac上装一个系统,因为许久未装了,还是花了点时间,不如写个博客,下次就更快安装了.在Mac OS X下使用Qt开发,需要配置Qt库和编 ...

  4. The process could not read file xxx due to OS error 53

      在不同地域的两个SQL Server服务器上配置了复制(Replication)用于同步数据(生产环境配置有Replication,测试环境也配有Replication),两地通过专线连接起来,这 ...

  5. dpdk EAL: Error reading from file descriptor 23: Input/output error

    执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...

  6. 问题记录-Get data from file(fonts/arial.ttf) failed, error code is 32

    time:2015/04/19 1. 描述:运行cocos的cpp-test例子,结果修改了代码之后提示错误:Get data from file(fonts/arial.ttf) failed, e ...

  7. 解决使用Qt creator时出现Cannot overwrite file ..Permission denied

    前两天在linux下使用Qt creator, 切换到了管理员使用了Qt creator后,再切换为普通用户,发现出现了 Cannot overwrite file ..Permission deni ...

  8. Qt creator 编译错误 :cannot find file .pro qt

    事实上问题的解决的方法非常easy:就是Qt不支持中文的路径,把源代码的路径所有改成英文就可以解决这个问题. 首先问题发生在我执行网上的样例程序时,又一次构建编译也是出错.提示: Cannot fin ...

  9. [ERROR] error: error while loading <root>, error in opening zip file error: scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.

    在家编译一个Apache的开源项目,在编译时遇到错误如下: error: error while loading <root>, error in opening zip file [ER ...

随机推荐

  1. Vue2+Webpack+ES6 兼容低版本浏览器(IE9)解决方案

    Vue2+Webpack+ES6 兼容低版本浏览器(IE9)解决方案 解决方式:安装 "babel-polyfill" 即可. 命令:npm install --save-dev ...

  2. 火狐浏览器安装接口测试工具RESTClient方法

  3. web前端-移动端响应式与自适应

    一. 在HTML的头部加入meta标签 在HTML的头部,也就是head标签中增加meta标签,告诉浏览器网页宽度等于设备屏幕宽度,且不进行缩放,代码如下: <meta name="v ...

  4. 记一次BootStrap的使用

    效果图如下: 一.简介: 什么是Bootstrap?  Bootstrap 是一个用于快速开发 Web 应用程序和网站的前端框架. 什么是响应式布局? 引用一句Bootstrap的标题语 “Boots ...

  5. HDU Train Problem I (STL_栈)

    Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot o ...

  6. 第十七章_Web注解

    1.HandlesTypes 这个注解类型用来声明ServletContainerInitializer能够处理哪些类型的类.它有一个属性.一个值.用来声明类的类型.比如,以下的ServletCont ...

  7. CCControlExtension/CCControlPotentiometer

    #ifndef __CCCONTROLPOTENTIOMETER_H__ #define __CCCONTROLPOTENTIOMETER_H__ #include "CCControl.h ...

  8. Android-Volley网络通信框架(自己定义Request 请求:实现 GsonRequest)

    1.回想 上篇学习了android 通过 volley 网络通信框架 实现 请求图片的三种方法! 2.重点 (1)复习和熟悉 StringRequest ,JsonObjectRequest 方法 ( ...

  9. js调节图片的亮度

    js调节图片的亮度:(使用CSS3的滤镜) 1.实现点亮图标.熄灭图标的效果 效果图: 页面代码: <!DOCTYPE html> <%@ page language="j ...

  10. C#.Net版本自动更新程序及3种策略实现

    C#.Net版本自动更新程序及3种策略实现 C/S程序是基于客户端和服务器的,在客户机编译新版本后将文件发布在更新服务器上,然后建立一个XML文件,该文件列举最新程序文件的版本号及最后修改日期.如程序 ...