I need help!!!
-
Help Needed: Implementing Files in Qt Creator Project
Hello everyone,
I am having trouble integrating my files into my Qt Creator project. I am relatively new to working with Qt and would greatly appreciate your support.
My Problem:
I am unable to successfully add my existing files to my project.
The files do not appear in the project structure even though I have tried to add them.
What I Have Tried:
Right-clicking on the project and selecting "Add Existing Files..."
Manually editing the .pro file
Restarting Qt Creator
Questions:
Is there a specific process I should follow to correctly add files to my project?
Do I need to make any additional configurations for the files to be recognized?
Are there common mistakes that beginners make during this process?
I would be grateful for any tips or advice. Please let me know if you need any further information.
Thank you in advance for your help!Add me on Discord aliatorc
-
Manually added entries should be under appropriate list, one of
sources +=
,headers +=
ordisfiles +=
.Please see https://doc.qt.io/qt-6/qmake-project-files.html and https://doc.qt.io/qt-6/qmake-variable-reference.html
-
First of all, the steps you have taken seem to be plausible. This is how it should usually work.
If you don't have existing Qt projects, you should rather use CMake instead of .pro files. This is going to be the future.
-
@SimonSchroeder does QtC now support adding existing files via gui, in a cmake project ofc ? Last time I checked you would have to type it all out by hand in the cmake file
-
This post is deleted!