AdabH
AdabH

Reputation: 161

QT creator : Adding folder for .cpp & .h filers

I work for a big project and i would like to put all .cpp & .h files in one folder . I did that in .pro file : SOURCES += src/main.cpp src/test.cpp HEADERS += src/test.h

The problem that in QT creator the files was in Headers>src>test.h and not in Headers>test.h directly .

Upvotes: 0

Views: 1603

Answers (2)

Tobias Hunger
Tobias Hunger

Reputation: 595

Qt Creator visualizes the build system. In qmake there is a huge difference in how headers and sources are handled. That's why Creator keeps them separate.

How should Creator keep all the headers in a flat out when they are stored in a tree? That makes little sense IMHO. People usually group files in folders for a reason.

Upvotes: 1

I would like that in the file system the .h & .cpp files put together in one folder

You have to implement it yourself by modifying your copy of Qt Creator.

I don't know why the default behavior [...]

... because different people have different preferences, and the entire world doesn't think the same.

Upvotes: -1

Related Questions