I am learning Qt6 in Qt Creator 8.0.2 (Community) with C++ on Windows. I have a project( Qt Widgets Application) with Qmake as the build system. When I open the project in Creator it is well organized, that is, the headers(.h files) are in a header folder, sources(.cpp files) are in sources folder, etc. Like so:
LearningQt
-LearningQt.pro
-Headers\
-mainwindow.h
-Sources\
-main.cpp
-mainwindow.cpp
-Forms\
-mainwindow.ui
But when I open the project in File explorer all the files are in the root directory. Like so:
LearningQt
-LearningQt.pro
-LearningQt.pro.user
-mainwindow.h
-main.cpp
-mainwindow.cpp
-mainwindow.ui
My question is that is it possible to organize the project files in folders in File explorer?
Yes, you can reorganise file locations. It is still unclear from your question what problems you have with it.
You just have to mimic whatever the changes you made on your storage directories in your *.pro file as well. QtCreator will usually understand what you did on the fly. If it does not then you erase or empty its temporary files in build directories. Here for example how to do it when you want absolute paths. The variable $$PWD
is location of the .pro file itself:
INCLUDEPATH += \
$$PWD/Headers
HEADERS += \
$$PWD/Headers/mainwindow.h
SOURCES += \
$$PWD/Sources/main.cpp \
$$PWD/Sources/mainwindow.cpp
Or other such changes. The *.pro is relatively simple and intuitive project file compared to other build systems like CMake, makefiles, XCode or Visual Studio project files. Also it is quite well documented. If you have concrete questions about particular feature of it then ask it in some other question.