QT5: QApplication, no such file or directory

在使用Qt5时遇到找不到QApplication等库文件的问题,原因是这些库已迁移至其他位置。文章提供了解决方案,包括更新头文件包含路径、修改profile以适应Qt4风格,以及详细说明了Qt应用在编程中的作用。

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值