Qt: Storing src and includes in subdirectories

  c++, qt

Qt Creator prefers to put my .cpp and .h files in the project’s top-level directory. I would prefer to follow the standard of pretty much the rest of the world, storing source files under src/ and include files either there or under include/.

I can do this in Qt Creator if I do it very manually. If I put them both in src, it’s not so bad. I can still do "new class" if I do it from right-click while specifying where it needs to go. Or I can manually move files and edit the .pro file.

But I’d really love to just set some global standards so Qt Creator just ALWAYS does this.

I’m NOT looking to make subprojects, so all the links I found about that aren’t helpful. I just want to know if there are configuration settings somewhere as to where the default location is for new source files.

Source: Windows Questions C++

LEAVE A COMMENT