qtwidgetsglobals.h file not found
-
It doesn't work, the files are in /usr/include/qt6/QtWidgets
-
@EuclidDivisionLemma
Then I would expect you to ensure that your include path has/usr/include/qt6
....
You don't want be to writing code which specifies/relies on a certain path of includes.I don't know whether this relates to your
QtWidgets/qtwidgetsglobal.h: No such file or directory
or not. You say the file exists, we need to get the path right for it to look in. -
Oh sorry, it is
/usr/include/x86_64-linux-gnu/qt6/
. But even after including the full path, it doesn't work, the same qtwidgetsglobal.h error` -
@EuclidDivisionLemma
I would expect it to work if you have#include <QApplication>
, the directory/usr/include/x86_64-linux-gnu/qt6
is on your include path, and the file exists at/usr/include/x86_64-linux-gnu/qt6/QtWidgets/qtwidgetsglobal.h
. That's all I know. -
What do you mean by "the directory /usr/include/x86_64-linux-gnu/qt6 is on your include path". Do you mean PATH variable?
-
@EuclidDivisionLemma said in qtwidgetsglobals.h file not found:
Do you mean PATH variable?
No, in the include paths for the compiler. They are automatically added by CMake when you link against the Qt libraries.
So show your CMakeLists.txt -
No, I don't have CMakeLists.txt, but I used
-I
flag -
@EuclidDivisionLemma said in qtwidgetsglobals.h file not found:
No, I don't have CMakeLists.txt, but I used -I flag
So how do you compile with QtCrerator then? qmake?
-
QtCreator does't work in the first place. When I use Qt Creator, it says that there are no suitable kits found. I'm compiling using the new Zed IDE.
-
@EuclidDivisionLemma said in qtwidgetsglobals.h file not found:
I'm compiling using the new Zed IDE.
So you should ask them how to properly set up a project in there. Maybe they also support CMake or qmake - I don't know.
Or fix your kit settings in QtCreator: https://doc.qt.io/qtcreator/creator-targets.html -