解决QT中报错xxx.h:4:10: ‘QMainWindow‘ file not found

简介: 解决QT中报错xxx.h:4:10: ‘QMainWindow‘ file not found

前言

qt 中这个报错非常无语,在一个目录下打开是正常的,然后copy 项目到其他文件夹就找不到报错,大家的原因都不太相同,这里列出以下几种可能及解决方法。

可能1. 中文路径
很有可能copy到了一个中文路径下的目录,然后导致出现问题。
解决方式就是换到英文目录
可能2. 将 .pro.user 结尾的文件复制的时候一起复制了
解决方式就是将 .pro.user 以及 .pro.user.xx 结尾的文件一起删除,然后重新打开项目

目录
相关文章
|
10月前
|
存储 C++
14 QT - QMainWindow
14 QT - QMainWindow
40 0
|
4月前
Qt6学习笔记三(QMainWindow、菜单栏、工具栏、状态栏、铆接部件、核心部件)
Qt6学习笔记三(QMainWindow、菜单栏、工具栏、状态栏、铆接部件、核心部件)
130 0
|
1月前
|
编解码 开发框架
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
88 3
|
3月前
Qt之QMainWindow
Qt之QMainWindow
|
4月前
|
存储
QT基础入门——QMainWindow与对话框QDialog(三)
QT基础入门——QMainWindow与对话框QDialog(三)
195 0
QT基础入门——QMainWindow与对话框QDialog(三)
|
4月前
|
容器
QT基础教学(QMainWindow)
QT基础教学(QMainWindow)
87 0
|
存储 C++
QT基础教程之四QMainWindow
QT基础教程之四QMainWindow
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
222 0
Qt 5——QMainWindow类
Qt 5——QMainWindow类
289 0
Qt 5——QMainWindow类
|
存储 C++
5、 QT基础——QMainWindow
5、 QT基础——QMainWindow
398 0
5、 QT基础——QMainWindow