QtWidgets/QAction: No such file or directory
-
I have done little program by Qt 5 four years ago, and compiled it without problems. Now I installed Qt 6.1.2, on Windows 7, and tried to compile and build. Otherwise everything seems to be allright but i got error message:
D:\Programming\Heating\SimplyHeatTransfer\ui_mainwindow.h:14: error: QtWidgets/QAction: No such file or directory
In file included from ..\SimplyHeatTransfer\mainwindow.cpp:2:
..\SimplyHeatTransfer\ui_mainwindow.h:14:10: fatal error: QtWidgets/QAction: No such file or directory
#include <QtWidgets/QAction>
and : -1: error: [Makefile.Release:608: release/mainwindow.o] Error 1Thanks
-
Hi and welcome to devnet,
A quick look at the Qt 6 QAction documentation shows it has move to QtGui.
You should update your include or rather drop the module part of the include.
-
@JGBe said in QtWidgets/QAction: No such file or directory:
because ui_mainwindow.h is automatically generated in the build process.
What build system do you use? Make sure it's not picking up the wrong uic.exe from Qt5.