how to deal with "no such file error or diretory" error for a new programmer in QT creator
2023-09-11 14:15:00 时间
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.
相关文章
- Qt-qt creator 运行 出现 "can not open .... jom for write 解决方案
- Qt托动无标题界面(ReleaseCapture法)
- QT-Qt设置背景图片
- QT-在Qt Widgets Application中怎么显示printf的输出内容?
- Qt-char*与QString互转 floatToqstring char*与QString互转 qt字符串与字符串数组操作 Qt 的QString类的使用
- 【C/C++学院】(17)QT标准对话框/toolbox类
- Last_IO_Error: error connecting to master 'tl@192.168.199.151:3306'
- s3c2410上搭建QT/Embedded4.8.5开发环境(二)--安装arm平台qt库qt-everywhere-opensource-src-4.8.5
- s3c2410上搭建QT/Embedded4.8.5开发环境(七)--命令行开始第一个Qt程序
- Qt开发经验小技巧合集
- Qt计算器的实现
- Qt项目架构之一:全局类说明
- Qt之QListView使用
- 使用Qt实现简单的图片预览效果
- QT多线程实战_Qt多线程开发项目
- QT配置opencv_qt调用opencv
- Qt开发-QT Quick
- C++QT开发——TCP&UDP网络编程
- 【Qt】在ubuntu上为可执行程序qt创建图标(亲测)
- 9、QT基础——Qt消息机制和事件
- Qt QMianWindow添加菜单项
- Qt 控件渐变隐藏消失
- 解决Ubuntu系统安装QT出错的问题:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it
- Qt 搭建VLC环境
- Qt creator 编译错误 :cannot find file .pro qt
- Qt Md5应用示例
- QT打印窗口、退出、设置字体及颜色、设置时间、控件实现系统函数、添加资源文件(菜单图片)、工具栏添加图片
- QT creator使用(二):Qt项目建立、编译、运行、发布及移植
- Qt编写控件属性设计器11-导入xml