解决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 结尾的文件一起删除,然后重新打开项目

目录
打赏
0
0
0
0
21
分享
相关文章
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
444 3
|
8月前
Qt之QMainWindow
Qt之QMainWindow
|
9月前
|
QT基础入门——QMainWindow与对话框QDialog(三)
QT基础入门——QMainWindow与对话框QDialog(三)
682 0
QT基础入门——QMainWindow与对话框QDialog(三)
|
9月前
Qt6学习笔记三(QMainWindow、菜单栏、工具栏、状态栏、铆接部件、核心部件)
Qt6学习笔记三(QMainWindow、菜单栏、工具栏、状态栏、铆接部件、核心部件)
234 0
|
9月前
|
QT基础教学(QMainWindow)
QT基础教学(QMainWindow)
193 0
14 QT - QMainWindow
14 QT - QMainWindow
58 0
未解决: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
258 0
5、 QT基础——QMainWindow
5、 QT基础——QMainWindow
424 0
5、 QT基础——QMainWindow
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等